Skip to content
Commit e1c75831 authored by Penglei Jiang's avatar Penglei Jiang Committed by Jens Axboe
Browse files

io_uring: fix potential page leak in io_sqe_buffer_register()



If allocation of the 'imu' fails, then the existing pages aren't
unpinned in the error path. This is mostly a theoretical issue,
requiring fault injection to hit.

Move unpin_user_pages() to unified error handling to fix the page leak
issue.

Fixes: d8c2237d ("io_uring: add io_pin_pages() helper")
Signed-off-by: default avatarPenglei Jiang <superman.xpt@gmail.com>
Link: https://lore.kernel.org/r/20250617165644.79165-1-superman.xpt@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f2320f1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment