[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220209102637.34088-1-jiapeng.chong@linux.alibaba.com>
Date: Wed, 9 Feb 2022 18:26:37 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: axboe@...nel.dk
Cc: asml.silence@...il.com, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] io_uring: Fix uninitialized use of ret in io_eventfd_register()
In some scenarios, ret is not assigned in the whole process, so it
needs to be initialized at the beginning.
Clean up the following clang warning:
fs/io_uring.c:9373:13: note: initialize the variable 'ret' to silence
this warning.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 5479f0607430..7f277890f1ec 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9370,7 +9370,7 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
{
struct io_ev_fd *ev_fd;
__s32 __user *fds = arg;
- int fd, ret;
+ int fd, ret = 0;
ev_fd = rcu_dereference_protected(ctx->io_ev_fd,
lockdep_is_held(&ctx->uring_lock));
--
2.20.1.7.g153144c
Powered by blists - more mailing lists