summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-10 10:02:37 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-10 10:02:37 -0700
commitb1648ead3749fd10e20466a76b7ca8b24e933dee (patch)
tree029bff3a204e02f4fdc6b3f9ab9b7f153d7f6f69
parentb14241c493ca9d846a058fe945740d9510ae0603 (diff)
[PATCH] Bug fix in AIO initialization
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com> 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.
-rw-r--r--kernel/fork.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 96ce3385cc75..2928684629e4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -375,6 +375,7 @@ static struct mm_struct * mm_init(struct mm_struct * mm)
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;