linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FDPIC: fix memory leak
@ 2011-07-06  3:30 Davidlohr Bueso
  0 siblings, 0 replies; 3+ messages in thread
From: Davidlohr Bueso @ 2011-07-06  3:30 UTC (permalink / raw)
  To: David Howells; +Cc: lkml, linux-fsdevel

From: Davidlohr Bueso <dave@gnu.org>

The shdr4extnum variable isn't being freed in the cleanup process of elf_fdpic_core_dump().

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 fs/binfmt_elf_fdpic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 63039ed..2bc5dc6 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1864,6 +1864,7 @@ cleanup:
 	kfree(psinfo);
 	kfree(notes);
 	kfree(fpu);
+	kfree(shdr4extnum);
 #ifdef ELF_CORE_COPY_XFPREGS
 	kfree(xfpu);
 #endif
-- 
1.7.4.1

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

* [PATCH] FDPIC: Fix memory leak
@ 2011-07-06 11:26 David Howells
  2011-07-06 21:16 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2011-07-06 11:26 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-fsdevel, linux-kernel, Davidlohr Bueso, uclinux-dev

From: Davidlohr Bueso <dave@gnu.org>

The shdr4extnum variable isn't being freed in the cleanup process of
elf_fdpic_core_dump().

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: David Howells <dhowells@redhat.com>
---

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


diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 63039ed..2bc5dc6 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1864,6 +1864,7 @@ cleanup:
 	kfree(psinfo);
 	kfree(notes);
 	kfree(fpu);
+	kfree(shdr4extnum);
 #ifdef ELF_CORE_COPY_XFPREGS
 	kfree(xfpu);
 #endif

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

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

* Re: [PATCH] FDPIC: Fix memory leak
  2011-07-06 11:26 [PATCH] FDPIC: Fix memory leak David Howells
@ 2011-07-06 21:16 ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2011-07-06 21:16 UTC (permalink / raw)
  To: David Howells
  Cc: uclinux-dev, linux-kernel, linux-fsdevel, torvalds, stable,
	Davidlohr Bueso

On Wed, 06 Jul 2011 12:26:05 +0100
David Howells <dhowells@redhat.com> wrote:

> From: Davidlohr Bueso <dave@gnu.org>
> 
> The shdr4extnum variable isn't being freed in the cleanup process of
> elf_fdpic_core_dump().
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  fs/binfmt_elf_fdpic.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
> index 63039ed..2bc5dc6 100644
> --- a/fs/binfmt_elf_fdpic.c
> +++ b/fs/binfmt_elf_fdpic.c
> @@ -1864,6 +1864,7 @@ cleanup:
>  	kfree(psinfo);
>  	kfree(notes);
>  	kfree(fpu);
> +	kfree(shdr4extnum);
>  #ifdef ELF_CORE_COPY_XFPREGS
>  	kfree(xfpu);
>  #endif

So if it dumps core often enough, the machine runs out of memory and
dies.  I added a cc:stable to my copy of this one.

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

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

end of thread, other threads:[~2011-07-06 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06 11:26 [PATCH] FDPIC: Fix memory leak David Howells
2011-07-06 21:16 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2011-07-06  3:30 [PATCH] FDPIC: fix " Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).