Re: [PATCH 02/29] block: Use bdev_open_by_dev() in blkdev_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2023 at 12:48:13PM +0200, Jan Kara wrote:
> diff --git a/block/ioctl.c b/block/ioctl.c
> index 648670ddb164..54c1e2f71031 100644
> --- a/block/ioctl.c
> +++ b/block/ioctl.c
> @@ -582,7 +582,8 @@ long blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
>  {
>  	struct block_device *bdev = I_BDEV(file->f_mapping->host);
>  	void __user *argp = (void __user *)arg;
> -	blk_mode_t mode = file_to_blk_mode(file);
> +	struct bdev_handle *bdev_handle = file->private_data;
> +	blk_mode_t mode = bdev_handle->mode;
>  	int ret;
>  
>  	switch (cmd) {

	Still the same bug as in v2 - you are missing the effects of
fcntl(2) setting/clearing O_NDELAY and sd_ioctl() is sensitive to that.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux