Re: [PATCH v3] firmware_loader: fix memory leak for paged buffer

From: Greg KH
Date: Mon Aug 24 2020 - 04:21:31 EST


On Mon, Aug 24, 2020 at 10:19:50AM +0200, Takashi Iwai wrote:
> On Thu, 20 Aug 2020 22:57:50 +0200,
> Prateek Sood wrote:
> >
> > vfree() is being called on paged buffer allocated
> > using alloc_page() and mapped using vmap().
> >
> > Freeing of pages in vfree() relies on nr_pages of
> > struct vm_struct. vmap() does not update nr_pages.
> > It can lead to memory leaks.
> >
> > Fixes: ddaf29fd9bb6 ("firmware: Free temporary page table after vmapping")
> > Signed-off-by: Prateek Sood <prsood@xxxxxxxxxxxxxx>
> > Reviewed-by: Takashi Iwai <tiwai@xxxxxxx>
> > Cc: stable@xxxxxxxxxxxxxxx
>
> Greg, could you review and merge this one please?

It's in my to-review queue, thanks.

greg k-h