The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Arjan van de Ven <arjan@infradead.org>,
	David Miller <davem@davemloft.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: nfs mount fail
Date: Mon, 19 Oct 2009 16:04:48 +0900	[thread overview]
Message-ID: <1255935888.11116.6.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20091019065433.GA29550@elte.hu>

On Mon, 2009-10-19 at 08:54 +0200, Ingo Molnar wrote:
> * Trond Myklebust <trond.myklebust@fys.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?
<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@kernel.org>
> Analyzed-by: Pekka Enberg <penberg@cs.helsinki.fi>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  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


      parent reply	other threads:[~2009-10-19  7:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18  1:25 nfs mount fail 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
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             ` Trond Myklebust [this message]

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=1255935888.11116.6.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=yhlu.kernel@gmail.com \
    /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