aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorSouptick Joarder <[email protected]>2020-10-15 20:13:15 -0700
committerLinus Torvalds <[email protected]>2020-10-16 11:11:22 -0700
commitfa63f083b3492b5ed5332b8d7c90b03b5ef24a1d (patch)
tree2200347fd904d625329ee7f170b670cdf6393293 /scripts/gdb/linux/tasks.py
parent64ead5201e757159d1d83a5e0752090c2ab3319f (diff)
rapidio: fix error handling path
rio_dma_transfer() attempts to clamp the return value of pin_user_pages_fast() to be >= 0. However, the attempt fails because nr_pages is overridden a few lines later, and restored to the undesirable -ERRNO value. The return value is ultimately stored in nr_pages, which in turn is passed to unpin_user_pages(), which expects nr_pages >= 0, else, disaster. Fix this by fixing the nesting of the assignment to nr_pages: nr_pages should be clamped to zero if pin_user_pages_fast() returns -ERRNO, or set to the return value of pin_user_pages_fast(), otherwise. [[email protected]: new changelog] Fixes: e8de370188d09 ("rapidio: add mport char device driver") Signed-off-by: Souptick Joarder <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: John Hubbard <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Matt Porter <[email protected]> Cc: Alexandre Bounine <[email protected]> Cc: Gustavo A. R. Silva <[email protected]> Cc: Madhuparna Bhowmik <[email protected]> Cc: Dan Carpenter <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions