aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorXiaoguang Wang <[email protected]>2020-05-05 08:28:53 +0000
committerJens Axboe <[email protected]>2020-05-05 19:18:11 +0000
commit7f13657d141346125f4d0bb93eab4777f40c406e (patch)
treeee786539b1ab574f47c0f9dd9c406a36176cc6c8 /tools/perf/scripts/python/netdev-times.py
parentio_uring: fix mismatched finish_wait() calls in io_uring_cancel_files() (diff)
downloadkernel-7f13657d141346125f4d0bb93eab4777f40c406e.tar.gz
kernel-7f13657d141346125f4d0bb93eab4777f40c406e.zip
io_uring: handle -EFAULT properly in io_uring_setup()
If copy_to_user() in io_uring_setup() failed, we'll leak many kernel resources, which will be recycled until process terminates. This bug can be reproduced by using mprotect to set params to PROT_READ. To fix this issue, refactor io_uring_create() a bit to add a new 'struct io_uring_params __user *params' parameter and move the copy_to_user() in io_uring_setup() to io_uring_setup(), if copy_to_user() failed, we can free kernel resource properly. Suggested-by: Jens Axboe <[email protected]> Signed-off-by: Xiaoguang Wang <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions