diff options
| author | Yi Xie <xieyi@kylinos.cn> | 2026-06-30 17:12:06 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-07-01 05:37:07 -0600 |
| commit | df645b745941ea829b39134ac342f730f4d9d978 (patch) | |
| tree | c1505f102d397c9d0053952d893fd789a6e3b184 /io_uring/memmap.c | |
| parent | 3996771b8f759729cba0a28007438c085f814d61 (diff) | |
| download | linux-next-df645b745941ea829b39134ac342f730f4d9d978.tar.gz linux-next-df645b745941ea829b39134ac342f730f4d9d978.zip | |
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>
Diffstat (limited to 'io_uring/memmap.c')
| -rw-r--r-- | io_uring/memmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/memmap.c b/io_uring/memmap.c index da1f6c5d07f8..23e8a85111bc 100644 --- a/io_uring/memmap.c +++ b/io_uring/memmap.c @@ -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. |
