lkml.org 
[lkml]   [2003]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] BUG() in exec_mmap()
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.175 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site