> -----Original Message-----
> From: Christoph Hellwig [mailto:h...@lst.de]
> Sent: Thursday, 30 October, 2014 4:27 AM
> To: linux-scsi@vger.kernel.org
> Cc: Douglas Gilbert; Elliott, Robert (Server Storage)
> Subject: [PATCH 3/6] sd: fix up ->compat_ioctl
> 
> No need to verify the passthrough ioctls, the real handler will
> take care of that.  Also make sure not to block for resets on
> O_NONBLOCK fds.
> 
> Signed-off-by: Christoph Hellwig <h...@lst.de>
> ---
>  drivers/scsi/sd.c | 28 ++++++++--------------------
>  1 file changed, 8 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 61e50ae..baf5cf4 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -1541,31 +1541,19 @@ static int sd_compat_ioctl(struct
> block_device *bdev, fmode_t mode,
>                          unsigned int cmd, unsigned long arg)
...
>       /*
>        * Let the static ioctl translation table take care of it.
>        */
> -     return -ENOIOCTLCMD;
> +     if (!sdev->host->hostt->compat_ioctl)
> +             return -ENOIOCTLCMD;

Although I don't see it in the quoted email, git complains that 
this line (and the original being deleted) have a space 
after -ENOIOCTLCMD;

> +     return sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user
> *)arg);
>  }
>  #endif
> 
> --
> 1.9.1

Reviewed-by: Robert Elliott <elli...@hp.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to