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] [day] [month] [year] [list]
Message-ID: <53878CFC.2090506@kernel.dk>
Date:	Thu, 29 May 2014 13:39:40 -0600
From:	Jens Axboe <axboe@...nel.dk>
To:	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	linux-scsi@...r.kernel.org
Subject: Re: block: remove dead code in scsi_ioctl:blk_verify_command

On 05/29/2014 01:11 PM, Dave Jones wrote:
> filter gets assigned the address of blk_default_cmd_filter on
> entry to this function, so the !filter condition can never be true.
> 
> Signed-off-by: Dave Jones <davej@...hat.com>
> 
> diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
> index 26487972ac54..9c28a5b38042 100644
> --- a/block/scsi_ioctl.c
> +++ b/block/scsi_ioctl.c
> @@ -205,10 +205,6 @@ int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm)
>  	if (capable(CAP_SYS_RAWIO))
>  		return 0;
>  
> -	/* if there's no filter set, assume we're filtering everything out */
> -	if (!filter)
> -		return -EPERM;
> -
>  	/* Anybody who can open the device can do a read-safe command */
>  	if (test_bit(cmd[0], filter->read_ok))
>  		return 0;

Thanks Dave, applied.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ