Re: [PATCH 5.10 058/306] scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND

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

 



Hi!

> From: Christoph Hellwig <hch@xxxxxx>
> 
> [ Upstream commit beec64d0c9749afedf51c3c10cf52de1d9a89cc0 ]
> 
> SCSI_IOCTL_SEND_COMMAND has been deprecated longer than bsg exists and has
> been warning for just as long.  More importantly it harcodes SCSI CDBs and
> thus will do the wrong thing on non-SCSI bsg nodes.

I see removing deprecated stuff is good idea in mainline, but do we
want to do that in -stable?

Best regads,
								Pavel

> +++ b/block/bsg.c
> @@ -371,10 +371,13 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  	case SG_GET_RESERVED_SIZE:
>  	case SG_SET_RESERVED_SIZE:
>  	case SG_EMULATED_HOST:
> -	case SCSI_IOCTL_SEND_COMMAND:
>  		return scsi_cmd_ioctl(bd->queue, NULL, file->f_mode, cmd, uarg);
>  	case SG_IO:
>  		return bsg_sg_io(bd->queue, file->f_mode, uarg);
> +	case SCSI_IOCTL_SEND_COMMAND:
> +		pr_warn_ratelimited("%s: calling unsupported SCSI_IOCTL_SEND_COMMAND\n",
> +				current->comm);
> +		return -EINVAL;
>  	default:
>  		return -ENOTTY;
>  	}

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux