Re: [PATCH 5.11 1/2] io_uring: initialize 'timeout' properly in io_sq_thread()

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

 



On Thu, Nov 12, 2020 at 02:55:59PM +0800, Xiaoguang Wang wrote:
Some static checker reports below warning:
   fs/io_uring.c:6939 io_sq_thread()
   error: uninitialized symbol 'timeout'.

Fix it.

We can also add the reporter:

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>


Signed-off-by: Xiaoguang Wang <xiaoguang.wang@xxxxxxxxxxxxxxxxx>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

LGTM:

Reviewed-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>


diff --git a/fs/io_uring.c b/fs/io_uring.c
index c1dcb22e2b76..c9b743be5328 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6921,7 +6921,7 @@ static int io_sq_thread(void *data)
	const struct cred *old_cred = NULL;
	struct io_sq_data *sqd = data;
	struct io_ring_ctx *ctx;
-	unsigned long timeout;
+	unsigned long timeout = 0;
	DEFINE_WAIT(wait);

	task_lock(current);
--
2.17.2





[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