aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorSouptick Joarder <[email protected]>2020-07-12 09:09:53 +0530
committerJuergen Gross <[email protected]>2020-08-03 07:41:25 +0200
commite398fb4bdf522abdeb8ddb61235bbf66065fc105 (patch)
tree08b42848e791b9d665f7928eae9c347c8034dc98 /lib/test_overflow.c
parentbcf876870b95592b52519ed4aafcf9d95999bc9c (diff)
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 <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Cc: John Hubbard <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Paul Durrant <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions