Re: nfs mount fail

From: Trond Myklebust
Date: Mon Oct 19 2009 - 03:05:09 EST


On Mon, 2009-10-19 at 08:54 +0200, Ingo Molnar wrote:
> * Trond Myklebust <trond.myklebust@xxxxxxxxxx> 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?
<snip>
> This commit:
>
> a67d18f: NFS: load the rpc/rdma transport module automatically
>
> Moved a kfree() of the options strings in nfs_parse_mount_options()
> inadvertently and introduced a double kfree(). Fix it.
>
> Reported-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> Analyzed-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
> ---
> fs/nfs/super.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index a2c18ac..482a2c3 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -1231,6 +1231,7 @@ static int nfs_parse_mount_options(char *raw,
> goto out_nomem;
> token = match_token(string,
> nfs_xprt_protocol_tokens, args);
> + kfree(string);
>
> switch (token) {
> case Opt_xprt_udp:
> @@ -1262,7 +1263,6 @@ static int nfs_parse_mount_options(char *raw,
> goto out_nomem;
> token = match_token(string,
> nfs_xprt_protocol_tokens, args);
> - kfree(string);
>
> switch (token) {
> case Opt_xprt_udp:

This patch appears to be reverting the correct fix from commit d508afb
in mainline
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git&a=commitdiff&h=d508afb437daee7cf07da085b635c44a4ebf9b38

Cheers
Trond

--
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/