aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaoguang Wang <[email protected]>2020-11-12 14:55:59 +0800
committerJens Axboe <[email protected]>2020-12-09 12:04:00 -0700
commita0d9205f7d36bf72279f34a93850fd14789fdc7e (patch)
tree2ecf1328ba80ceeaf41e7d9554c47eb21b2755ba
parent08369246344077a9cf8109c1cf92a640733314f2 (diff)
io_uring: initialize 'timeout' properly in io_sq_thread()
Some static checker reports below warning: fs/io_uring.c:6939 io_sq_thread() error: uninitialized symbol 'timeout'. This is a false positive, but let's just initialize 'timeout' to make sure we don't trip over this. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Xiaoguang Wang <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index b789b9af2f4c..d52d6f529dc6 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6908,7 +6908,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);