[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131108155735.GB26611@redhat.com>
Date: Fri, 8 Nov 2013 16:57:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Anton Arapov <aarapov@...hat.com>, David Smith <dsmith@...hat.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] uprobes: Fix the wrong usage of current->utask in
uprobe_copy_process()
Commit aa59c53fd459 "uprobes: Change uprobe_copy_process() to dup
xol_area" has a stupid typo, we need to setup t->utask->vaddr but
the code wrongly uses current->utask.
Even with this bug dup_xol_work() works "in practice", but only
because get_unmapped_area(NULL, TASK_SIZE - PAGE_SIZE) likely
returns the same address every time.
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
---
kernel/events/uprobes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 26fdd65..847201f 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1446,7 +1446,7 @@ void uprobe_copy_process(struct task_struct *t, unsigned long flags)
if (!work)
return uprobe_warn(t, "dup xol area");
- utask->vaddr = area->vaddr;
+ t->utask->vaddr = area->vaddr;
init_task_work(work, dup_xol_work);
task_work_add(t, work, true);
}
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists