Re: fs/exec.c: fix minor memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 May 2016 22:43:39 +0200 Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> Andrew, Vlastimil,
> 
> I found this patch by accident when I was looking at http://marc.info/?l=linux-mm
> and I can't resist ;)
> 
> > On 04/21/2016 11:15 PM, Andrew Morton wrote:
> > >
> > > Could someone please double-check this?
> >
> > Looks OK to me.
> >
> > > From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > > Subject: fs/exec.c: fix minor memory leak
> > >
> > > When the to-be-removed argument's trailing '\0' is the final byte in the
> > > page, remove_arg_zero()'s logic will avoid freeing the page, will break
> > > from the loop and will then advance bprm->p to point at the first byte in
> > > the next page.  Net result: the final page for the zeroeth argument is
> > > unfreed.
> > >
> > > It isn't a very important leak - that page will be freed later by the
> > > bprm-wide sweep in free_arg_pages().
> 
> And so I think we should just remove this free_arg_page(), it (and the patch)
> only adds the unnecessary confusion.
> 

Send patch :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]