mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
io_uring/memmap: return -EINVAL from get_unmapped_area() on bad mmap
get_unmapped_area() returns -ENOMEM when io_uring_validate_mmap_request() fails, but validation errors are -EINVAL. Propagate that errno to userspace, like io_uring_mmap() already does. Signed-off-by: Yi Xie <xieyi@kylinos.cn> Link: https://patch.msgid.link/20260630091206.126206-1-xieyi@kylinos.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
+1
-1
@@ -337,7 +337,7 @@ unsigned long io_uring_get_unmapped_area(struct file *filp, unsigned long addr,
|
||||
|
||||
ptr = io_uring_validate_mmap_request(filp, pgoff);
|
||||
if (IS_ERR(ptr))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(ptr);
|
||||
|
||||
/*
|
||||
* Some architectures have strong cache aliasing requirements.
|
||||
|
||||
Reference in New Issue
Block a user