summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-07-25 12:52:04 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 18:48:17 +0300
commit2e32ba5607ee2b668baa8831dd74f7cc867a1f7e (patch)
treefb9c77142c108f93940f29d5935d81461211711c /io_uring
parentcb309ae49da7a7c28f0051deea13970291134fac (diff)
downloadlinux-2e32ba5607ee2b668baa8831dd74f7cc867a1f7e.tar.xz
io_uring/net: checks errors of zc mem accounting
mm_account_pinned_pages() may fail, don't ignore the return value. Fixes: e29e3bd4b968 ("io_uring: account locked pages for non-fixed zc") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/dae0542ed8e6706071bb83ad3e7ad6a70d207fd9.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/net.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 62be89837d82..8fb8469c3315 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -985,7 +985,9 @@ int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
&msg.msg_iter);
if (unlikely(ret))
return ret;
- mm_account_pinned_pages(&notif->uarg.mmp, zc->len);
+ ret = mm_account_pinned_pages(&notif->uarg.mmp, zc->len);
+ if (unlikely(ret))
+ return ret;
}
if (zc->addr) {