[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <176418917794.112345.305526865203772039.b4-ty@kernel.dk>
Date: Wed, 26 Nov 2025 13:32:57 -0700
From: Jens Axboe <axboe@...nel.dk>
To: linux-block@...r.kernel.org, Kevin Brodsky <kevin.brodsky@....com>
Cc: linux-kernel@...r.kernel.org, Ali Utku Selen <ali.utku.selen@....com>,
Ming Lei <ming.lei@...hat.com>
Subject: Re: [PATCH] ublk: prevent invalid access with DEBUG
On Wed, 26 Nov 2025 12:48:35 +0000, Kevin Brodsky wrote:
> ublk_ch_uring_cmd_local() may jump to the out label before
> initialising the io pointer. This will cause trouble if DEBUG is
> defined, because the pr_devel() call dereferences io. Clang reports:
>
> drivers/block/ublk_drv.c:2403:6: error: variable 'io' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> 2403 | if (tag >= ub->dev_info.queue_depth)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/block/ublk_drv.c:2492:32: note: uninitialized use occurs here
> 2492 | __func__, cmd_op, tag, ret, io->flags);
> |
>
> [...]
Applied, thanks!
[1/1] ublk: prevent invalid access with DEBUG
(no commit info)
Best regards,
--
Jens Axboe
Powered by blists - more mailing lists