aboutsummaryrefslogtreecommitdiff
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2020-11-13 22:51:56 -0800
committerLinus Torvalds <[email protected]>2020-11-14 11:26:03 -0800
commit96e1fac162cc0086c50b2b14062112adb2ba640e (patch)
tree4926cbaabf26bb0308e9408f280a6cab644331bf /include/linux/compiler-gcc.h
parent22e4663e916321b72972c69ca0c6b962f529bd78 (diff)
mm/gup: use unpin_user_pages() in __gup_longterm_locked()
When FOLL_PIN is passed to __get_user_pages() the page list must be put back using unpin_user_pages() otherwise the page pin reference persists in a corrupted state. There are two places in the unwind of __gup_longterm_locked() that put the pages back without checking. Normally on error this function would return the partial page list making this the caller's responsibility, but in these two cases the caller is not allowed to see these pages at all. Fixes: 3faa52c03f44 ("mm/gup: track FOLL_PIN pages") Reported-by: Ira Weiny <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: John Hubbard <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Dan Williams <[email protected]> Cc: <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/compiler-gcc.h')
0 files changed, 0 insertions, 0 deletions