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

2020-12-28 Thread Souptick Joarder
On Wed, Dec 9, 2020 at 1:18 AM Souptick Joarder wrote: > > On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > > > On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder > > wrote: > > > > > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > > or get_user_pages_fast()

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

2020-12-08 Thread Souptick Joarder
On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > On Wed, Nov 4, 2020 at 7:32 AM 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(

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

2020-11-18 Thread Souptick Joarder
On Wed, Nov 4, 2020 at 7:32 AM 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 value and

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

2020-11-03 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