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]
Message-ID: <81487bcb-6f48-9a15-2884-fb1441210d2f@oracle.com>
Date:   Sat, 22 Jan 2022 05:50:41 +0800
From:   Anand Jain <anand.jain@...cle.com>
To:     trix@...hat.com, clm@...com, josef@...icpanda.com,
        dsterba@...e.com, nathan@...nel.org, ndesaulniers@...gle.com
Cc:     linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] btrfs: initialize variable cancel



On 21/01/2022 21:45, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
> 
> 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")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>   fs/btrfs/ioctl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 190ad8af4f45a..26e82379747f8 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -3308,7 +3308,7 @@ static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
>   	struct block_device *bdev = NULL;
>   	fmode_t mode;
>   	int ret;
> -	bool cancel;
> +	bool cancel = false;


  Reviewed-by: Anand Jain <anand.jain@...cle.com>

Thanks,
Anand

>   
>   	if (!capable(CAP_SYS_ADMIN))
>   		return -EPERM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ