mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@austin.ibm.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com.br>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] BUG() in exec_mmap()
Date: Thu, 09 Oct 2003 15:10:08 -0500	[thread overview]
Message-ID: <1065730208.27064.20.camel@shaggy.austin.ibm.com> (raw)

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


             reply	other threads:[~2003-10-09 20:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09 20:10 Dave Kleikamp [this message]
2003-10-09 20:19 ` Marcelo Tosatti
2003-10-09 20:25   ` 2.4.x performance tests " Marcelo Tosatti
2003-10-09 20:43   ` Mika Penttilä
2003-10-09 20:47     ` Marcelo Tosatti
2003-10-10  1:01 Ernie Petrides
2003-10-10 10:57 ` Marcelo Tosatti
2003-10-10  1:24 Ernie Petrides
2003-10-10 11:18 Ernie Petrides

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1065730208.27064.20.camel@shaggy.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®