linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug fix in AIO initialization
@ 2003-07-07 22:02 Chen, Kenneth W
  2003-07-08  9:53 ` Wim ten Have
  0 siblings, 1 reply; 5+ messages in thread
From: Chen, Kenneth W @ 2003-07-07 22:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: linux-aio

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

We hit this bug when we have the following scenario:

One process initializes an AIO context and then forks out many child
processes.  When those child processes exit, many BUG checks
(effectively kernel oops) were triggered from put_ioctx(ctx) in function
exit_aio().

The issue was that the AIO context was incorrectly copied upon forking
and mislead all child processes to think they have an IO context and
trying to free it where they really don't own.  The following patch fix
the issue.

- Ken

[-- Attachment #2: aio.init.patch --]
[-- Type: application/octet-stream, Size: 403 bytes --]

--- linux-2.5.74/kernel/fork.c	Mon Jul  7 14:35:07 2003
+++ linux-2.5.74.aio/kernel/fork.c	Mon Jul  7 14:35:07 2003
@@ -375,6 +375,7 @@
 	mm->core_waiters = 0;
 	mm->page_table_lock = SPIN_LOCK_UNLOCKED;
 	mm->ioctx_list_lock = RW_LOCK_UNLOCKED;
+	mm->ioctx_list = NULL;
 	mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
 	mm->free_area_cache = TASK_UNMAPPED_BASE;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-08 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-07 22:02 Bug fix in AIO initialization Chen, Kenneth W
2003-07-08  9:53 ` Wim ten Have
2003-07-08 18:13   ` Suparna Bhattacharya
2003-07-08 12:41     ` Wim ten Have
2003-07-08 19:45       ` Suparna Bhattacharya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).