summaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2020-07-12 06:39:53 +0300
committerJuergen Gross <jgross@suse.com>2020-08-03 08:41:25 +0300
commite398fb4bdf522abdeb8ddb61235bbf66065fc105 (patch)
tree08b42848e791b9d665f7928eae9c347c8034dc98 /lib/mpi/mpiutil.c
parentbcf876870b95592b52519ed4aafcf9d95999bc9c (diff)
downloadlinux-e398fb4bdf522abdeb8ddb61235bbf66065fc105.tar.xz
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 by passing correct number of partially mapped pages & -ERRNO separately, while returning from lock_pages() due to error. With this fix unlock_pages() doesn't need to validate pages[i] till *nr_pages* for error scenario and few condition checks can be ignored. Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Reviewed-by: Paul Durrant <paul@xen.org> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Paul Durrant <xadimgnik@gmail.com> Link: https://lore.kernel.org/r/1594525195-28345-2-git-send-email-jrdr.linux@gmail.com Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions