[PATCH for-next 2/4] io_uring/net: checks errors of zc mem accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mm_account_pinned_pages() may fail, don't ignore the return value.

Fixes: d3b8269075f67 ("io_uring: account locked pages for non-fixed zc")
Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
 io_uring/net.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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) {
-- 
2.37.0




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux