Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Souptick Joarder
On Tue, Jul 7, 2020 at 5:15 PM Jürgen Groß wrote: > > On 07.07.20 13:40, Souptick Joarder wrote: > > On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote: > >> > >> On 06.07.20 20:16, Souptick Joarder wrote: > >>> Previously, if lock_pages() end up partially mapping pages, it used > >>> to return

Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Jürgen Groß
On 07.07.20 13:40, Souptick Joarder wrote: On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote: On 06.07.20 20:16, Souptick Joarder wrote: Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till

Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Souptick Joarder
On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote: > > On 06.07.20 20:16, Souptick Joarder wrote: > > Previously, if lock_pages() end up partially mapping pages, it used > > to return -ERRNO due to which unlock_pages() have to go through > > each pages[i] till *nr_pages* to validate them. This can

Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Jürgen Groß
On 06.07.20 20:16, Souptick Joarder wrote: Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till *nr_pages* to validate them. This can be avoided by passing correct number of partially mapped pages &

[PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-06 Thread Souptick Joarder
Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till *nr_pages* to validate them. This can be avoided by passing correct number of partially mapped pages & -ERRNO separately, while returning from