From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] FDPIC: Fix memory leak Date: Wed, 6 Jul 2011 14:16:04 -0700 Message-ID: <20110706141604.92fd4f9a.akpm@linux-foundation.org> References: <20110706112604.29112.39546.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: uclinux-dev@uclinux.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org, stable@kernel.org, Davidlohr Bueso To: David Howells Return-path: In-Reply-To: <20110706112604.29112.39546.stgit@warthog.procyon.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: stable-bounces@linux.kernel.org Errors-To: stable-bounces@linux.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 06 Jul 2011 12:26:05 +0100 David Howells wrote: > From: Davidlohr Bueso > > The shdr4extnum variable isn't being freed in the cleanup process of > elf_fdpic_core_dump(). > > Signed-off-by: Davidlohr Bueso > Signed-off-by: David Howells > --- > > 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