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

2020-07-13 Thread Paul Durrant
> > Subject: [PATCH v3 1/3] xen/privcmd: Corrected error handling path > > 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 &

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

2020-07-11 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 lock_