All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs: Fix nfs_parse_mount_options() kfree() leak
@ 2009-10-20  5:13 Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2009-10-20  5:13 UTC (permalink / raw)
  To: Linus Torvalds, stable; +Cc: Yinghai Lu, Pekka Enberg, Ingo Molnar, linux-nfs

From: Yinghai Lu <yinghai@kernel.org>

Fix a (small) memory leak in one of the error paths of
the NFS mount options parsing code.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Reported-by: Pekka Enberg <penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
Regression introduced in 2.6.30 by commit a67d18f (NFS: load the
rpc/rdma transport module automatically). Please apply to mainline
+stable...

 fs/nfs/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] nfs: Fix nfs_parse_mount_options() kfree() leak
  2009-10-19  8:29                 ` Trond Myklebust
@ 2009-10-19  8:39                   ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-10-19  8:39 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: Yinghai Lu, Pekka Enberg, Arjan van de Ven, David Miller,
	Linux Kernel Mailing List


* Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> > So d508afb fixed all that needed fixing and there's nothing serious 
> > pending here. I've reverted all pending bits in tip:out-of-tree, so 
> > it's pure -git now. I rarely have to carry any NFS fixes in 
> > out-of-tree, this was an odd-one-out exception that fell through the 
> > cracks.
> > 
> > 	Ingo
> 
> OK. Could you resend the remaining leak fix, with the fixed up 
> changelog and attributions so I can pass it on to Linus?

Sure - find it below.

Thanks,

	Ingo

-------------------------------------------->
>From 42497c08be18c388f696a692ca5f8c3ba48cb183 Mon Sep 17 00:00:00 2001
From: Yinghai Lu <yinghai@kernel.org>
Date: Fri, 3 Apr 2009 09:06:15 +0200
Subject: [PATCH] nfs: Fix nfs_parse_mount_options() kfree() leak

Fix a (small) memory leak in one of the error paths of
the NFS mount options parsing code.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Reported-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 fs/nfs/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-20  5:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-20  5:13 [PATCH] nfs: Fix nfs_parse_mount_options() kfree() leak Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2009-10-19  5:52 nfs mount fail 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.