This is a note to let you know that I've just added the patch titled btrfs: fix use of uninitialized variable at rm device ioctl to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: btrfs-fix-use-of-uninitialized-variable-at-rm-device-ioctl.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 37b4599547e324589e011c20f74b021d6d25cb7f Mon Sep 17 00:00:00 2001 From: Tom Rix <trix@xxxxxxxxxx> Date: Fri, 21 Jan 2022 05:45:22 -0800 Subject: btrfs: fix use of uninitialized variable at rm device ioctl From: Tom Rix <trix@xxxxxxxxxx> commit 37b4599547e324589e011c20f74b021d6d25cb7f upstream. Clang static analysis reports this problem ioctl.c:3333:8: warning: 3rd function call argument is an uninitialized value ret = exclop_start_or_cancel_reloc(fs_info, cancel is only set in one branch of an if-check and is always used. So initialize to false. Fixes: 1a15eb724aae ("btrfs: use btrfs_get_dev_args_from_path in dev removal ioctls") Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx> Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx> Signed-off-by: Tom Rix <trix@xxxxxxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3291,7 +3291,7 @@ static long btrfs_ioctl_rm_dev(struct fi struct block_device *bdev = NULL; fmode_t mode; int ret; - bool cancel; + bool cancel = false; if (!capable(CAP_SYS_ADMIN)) return -EPERM; Patches currently in stable-queue which might be from trix@xxxxxxxxxx are queue-5.15/btrfs-fix-use-of-uninitialized-variable-at-rm-device-ioctl.patch