[PATCH] BUG() in exec_mmap()

From: Dave Kleikamp
Date: Thu Oct 09 2003 - 15:11:39 EST


Marcelo,
A recent change to exec_mmap() removed the initialization of old_mm,
leaving an uninitialized use of it. This patch would completely remove
old_mm from the function. Is this what was intended?

===== fs/exec.c 1.30 vs edited =====
--- 1.30/fs/exec.c Thu Oct 9 08:48:43 2003
+++ edited/fs/exec.c Thu Oct 9 14:58:42 2003
@@ -423,7 +423,7 @@

static int exec_mmap(void)
{
- struct mm_struct * mm, * old_mm;
+ struct mm_struct * mm;

mm = mm_alloc();
if (mm) {
@@ -447,11 +447,6 @@
task_unlock(current);
activate_mm(active_mm, mm);
mm_release();
- if (old_mm) {
- if (active_mm != old_mm) BUG();
- mmput(old_mm);
- return 0;
- }
mmdrop(active_mm);
return 0;
}

--
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/