[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440910190031m33e116d3o90869de5212bb2e@mail.gmail.com>
Date: Mon, 19 Oct 2009 00:31:01 -0700
From: Yinghai Lu <yhlu.kernel@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Pekka Enberg <penberg@...helsinki.fi>,
Trond Myklebust <trond.myklebust@....uio.no>,
Arjan van de Ven <arjan@...radead.org>,
David Miller <davem@...emloft.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: nfs mount fail
On Mon, Oct 19, 2009 at 12:08 AM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Pekka Enberg <penberg@...helsinki.fi> wrote:
>
>> Hi Ingo,
>>
>> On Mon, 2009-10-19 at 08:54 +0200, Ingo Molnar wrote:
>> > * Trond Myklebust <trond.myklebust@....uio.no> wrote:
>> >
>> > > > yes. something miss merged again...
>> > > >
>> > > > need change some lines.
>> > >
>> > > This doesn't match mainline either. To do so, the above kfree() has to
>> > > be at the end of the "Opt_xprt_rdma:" case...
>> >
>> > it's from a test patch in tip:out-of-tree:
>> >
>> > d40bc6b: <not-for-merge> nfs: fix nfs_parse_mount_options() double kfree()
>> >
>> > (attached below)
>> >
>> > that fix is wrong apparently - is there a correct fix upstream perhaps?
>>
>> AFAICT, yes. See commit d508afb437daee7cf07da085b635c44a4ebf9b38 ("NFS:
>> Fix a double free in nfs_parse_mount_options()") from Trond.
>
> sigh. That was written 3 days after your and Yinghai's patch was sent -
> there's no Reported-by credit, there was no Cc: back to the original
> thread - plus there was a memory leak was left in there as well. Trond?
>
sth like this to fix possible mem leaking...
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index a2c18ac..90be551 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1253,6 +1253,7 @@ static int nfs_parse_mount_options(char *raw,
default:
dfprintk(MOUNT, "NFS: unrecognized "
"transport protocol\n");
+ kfree(string);
return 0;
}
break;
--
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