mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Tejun Heo <htejun@gmail.com>
Subject: Re: [2 regressions] Current git cannot find root device on x86-64 (HP nx6325), NFS broken
Date: Mon, 06 Apr 2009 16:46:06 -0700	[thread overview]
Message-ID: <1239061566.6196.13.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <200904070047.56172.rjw@sisk.pl>

On Tue, 2009-04-07 at 00:47 +0200, Rafael J. Wysocki wrote:
> Also, mounting directories over NFS doesn't work (I think it oopses, but
> didn't have the time to look at it more closely).

There is a known double free issue that affects the 'proto=' mount
option (we call kfree(string) twice). Please could you check that the
following patch fixes it for you?

Cheers
  Trond

--------------------------------------------------------------------
>From a3e6cc62dce11c75249f01423eb9b41531759d36 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Mon, 6 Apr 2009 16:41:35 -0700
Subject: [PATCH] NFS: Fix a double free in nfs_parse_mount_options()

Due to an apparent typo, commit a67d18f89f5782806135aad4ee012ff78d45aae7
(NFS: load the rpc/rdma transport module automatically) lead to the
'proto=' mount option doing a double free, while Opt_mountproto leaks a
string.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 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 82eaadb..6717200 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1228,7 +1228,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:
@@ -1258,6 +1257,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:
-- 
1.6.0.4



-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  reply	other threads:[~2009-04-06 23:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 22:47 Rafael J. Wysocki
2009-04-06 23:46 ` Trond Myklebust [this message]
2009-04-07 19:18   ` Rafael J. Wysocki
2009-04-07  5:39 ` Mike Galbraith
2009-04-07 14:58 [2 regressions] Current git cannot find root device on x86-64(HP " Larry Finger
2009-04-07 19:13 ` Rafael J. Wysocki
2009-04-07 19:30   ` Larry Finger
2009-04-07 20:49     ` Rafael J. Wysocki
2009-04-07 20:57       ` Larry Finger
2009-04-07 21:10         ` Rafael J. Wysocki

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=1239061566.6196.13.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    /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®