提交 a0d9205f 编写于 作者: X Xiaoguang Wang 提交者: Jens Axboe

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Reviewed-by: NStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 08369246
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册