lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Jan 2023 14:01:54 +0000
From:   Pavel Begunkov <asml.silence@...il.com>
To:     Tom Rix <trix@...hat.com>, axboe@...nel.dk, nathan@...nel.org,
        ndesaulniers@...gle.com
Cc:     io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] io_uring: initialize count variable to 0

On 1/24/23 12:58, Tom Rix wrote:
> The clang build fails with
> io_uring/io_uring.c:1240:3: error: variable 'count' is uninitialized
>    when used here [-Werror,-Wuninitialized]
>    count += handle_tw_list(node, &ctx, &uring_locked, &fake);
>    ^~~~~
> 
> The commit listed in the fixes: removed the initialization of count.

My bad. The patch looks good, thanks


> Fixes: b5b57128d0cd ("io_uring: refactor tctx_task_work")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>   io_uring/io_uring.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
> index 734d074cdd94..4cb409ae9840 100644
> --- a/io_uring/io_uring.c
> +++ b/io_uring/io_uring.c
> @@ -1227,7 +1227,7 @@ void tctx_task_work(struct callback_head *cb)
>   	struct llist_node fake = {};
>   	struct llist_node *node;
>   	unsigned int loops = 0;
> -	unsigned int count;
> +	unsigned int count = 0;
>   
>   	if (unlikely(current->flags & PF_EXITING)) {
>   		io_fallback_tw(tctx);

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ