mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02: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:
parent
3996771b8f
commit
df645b7459
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user