mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Arjan van de Ven <arjan@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: nfs mount fail
Date: Sun, 18 Oct 2009 22:52:01 -0700	[thread overview]
Message-ID: <86802c440910182252v4648a7d1k249d091799583e37@mail.gmail.com> (raw)
In-Reply-To: <1255921080.839.2.camel@penberg-laptop>

On Sun, Oct 18, 2009 at 7:58 PM, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> On Mon, 2009-10-19 at 11:43 +0900, Arjan van de Ven wrote:
>> On Mon, 19 Oct 2009 05:35:20 +0300
>> Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>>
>> > >
>> > > [  278.734149] ------------[ cut here ]------------
>> > > [  278.739620] kernel BUG at mm/slub.c:2969!
>> >
>> > So this means that someone is passing a pointer to kfree() that did
>> > not come from kmalloc(). Which tree are you testing?
>>
>> > > [  278.770030] Pid: 2594, comm: rpciod/0 Not tainted
>> > > 2.6.32-rc5-tip-01483-ga166936-dirty #651
>>
>> some evil person decided to put the exact kernel tree/version in the
>> oops output ;-)
>
> Oh, right. Ingo, Yinghai says Linus' tree is fine so any ideas why this
> shows up in -tip? Also it seems we've had a similar bug before:
>
>  http://lkml.org/lkml/2009/4/2/698
>
> Hmmh?

yes. something miss merged again...

need change some lines.

---
 fs/nfs/super.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/fs/nfs/super.c
===================================================================
--- linux-2.6.orig/fs/nfs/super.c
+++ linux-2.6/fs/nfs/super.c
@@ -1231,7 +1231,6 @@ static int nfs_parse_mount_options(char
 				goto out_nomem;
 			token = match_token(string,
 					    nfs_xprt_protocol_tokens, args);
-			kfree(string);

 			switch (token) {
 			case Opt_xprt_udp:
@@ -1254,6 +1253,7 @@ static int nfs_parse_mount_options(char
 			default:
 				dfprintk(MOUNT, "NFS:   unrecognized "
 						"transport protocol\n");
+				kfree(string);
 				return 0;
 			}
 			break;
@@ -1264,6 +1264,8 @@ static int nfs_parse_mount_options(char
 			token = match_token(string,
 					    nfs_xprt_protocol_tokens, args);

+			kfree(string);
+
 			switch (token) {
 			case Opt_xprt_udp:
 				mnt->mount_server.protocol = XPRT_TRANSPORT_UDP;

  reply	other threads:[~2009-10-19  5:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18  1:25 Yinghai Lu
2009-10-18  4:22 ` Yinghai Lu
2009-10-19  2:35 ` Pekka Enberg
2009-10-19  2:43   ` Arjan van de Ven
2009-10-19  2:58     ` Pekka Enberg
2009-10-19  5:52       ` Yinghai Lu [this message]
2009-10-19  6:30         ` Trond Myklebust
2009-10-19  6:54           ` Ingo Molnar
2009-10-19  6:58             ` Pekka Enberg
2009-10-19  7:08               ` Ingo Molnar
2009-10-19  7:31                 ` Yinghai Lu
2009-10-19  7:52                   ` Trond Myklebust
2009-10-19  8:04                     ` Ingo Molnar
2009-10-19  8:23                       ` Ingo Molnar
2009-10-19  8:29                         ` Trond Myklebust
2009-10-19  8:39                           ` [PATCH] nfs: Fix nfs_parse_mount_options() kfree() leak Ingo Molnar
2009-10-19  7:04             ` [re-send PATCH] nfs: Fix nfs_parse_mount_options() double kfree() Ingo Molnar
2009-10-19  7:10               ` Ingo Molnar
2009-10-19  7:04             ` nfs mount fail Trond Myklebust

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=86802c440910182252v4648a7d1k249d091799583e37@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    /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®