Commit ce902cc
committed
vfio/type1: Catch zero from pin_user_pages_remote()
jira LE-3557
Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6
commit-author Alex Williamson <[email protected]>
commit afe84f3
pin_user_pages_remote() can currently return zero for invalid args
or zero nr_pages, neither of which should ever happen. However
vaddr_get_pfns() indicates it should only ever return a positive
value or -errno and there's a theoretical case where this can slip
through and be unhandled by callers. Therefore convert zero to
-EFAULT.
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Mitchell Augustin <[email protected]>
Tested-by: Mitchell Augustin <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
(cherry picked from commit afe84f3)
Signed-off-by: Jonathan Maple <[email protected]>1 parent a19d26d commit ce902cc
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
| |||
0 commit comments