Re: nfs mount fail

From: Yinghai Lu
Date: Mon Oct 19 2009 - 01:59:00 EST


On Sun, Oct 18, 2009 at 7:58 PM, Pekka Enberg <penberg@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> 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;
--
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/