Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-28 Thread Dan Carpenter
On Tue, Sep 29, 2020 at 07:34:39AM +0530, Souptick Joarder wrote: > Hi Dan, > > > On Mon, Sep 28, 2020 at 2:08 PM Dan Carpenter > wrote: > > > > On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote: > > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > > or

Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-28 Thread Souptick Joarder
Hi Dan, On Mon, Sep 28, 2020 at 2:08 PM Dan Carpenter wrote: > > On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote: > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > or get_user_pages_fast() will be called. However, these API might fail. > > > > But fre

Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-28 Thread Dan Carpenter
On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote: > Inside alloc_user_pages() based on flag value either pin_user_pages() > or get_user_pages_fast() will be called. However, these API might fail. > > But free_user_pages() called in error handling path doesn't bother > about return

Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-27 Thread Markus Elfring
> Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory > allocation") Please omit a line break for this tag. Regards, Markus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/dr

[PATCH] media: atomisp: Fixed error handling path

2020-09-27 Thread Souptick Joarder
Inside alloc_user_pages() based on flag value either pin_user_pages() or get_user_pages_fast() will be called. However, these API might fail. But free_user_pages() called in error handling path doesn't bother about return value and will try to unpin bo->pgnr pages, which is incorrect. Fix this by