Re: [PATCH] misc: mic: scif: Fix error handling path

2020-09-19 Thread John Hubbard
On 9/19/20 7:51 PM, Souptick Joarder wrote: Inside __scif_pin_pages(), when map_flags != SCIF_MAP_KERNEL it will call pin_user_pages_fast() to map nr_pages. However, pin_user_pages_fast() might fail with a return value -ERRNO. The return value is stored in pinned_pages->nr_pages. which in turn i

[PATCH] misc: mic: scif: Fix error handling path

2020-09-19 Thread Souptick Joarder
Inside __scif_pin_pages(), when map_flags != SCIF_MAP_KERNEL it will call pin_user_pages_fast() to map nr_pages. However, pin_user_pages_fast() might fail with a return value -ERRNO. The return value is stored in pinned_pages->nr_pages. which in turn is passed to unpin_user_pages(), which expects