Re: [PATCH 18/24] scsi_ioctl: move the "block layer" SCSI ioctl handling to drivers/scsi

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

 



On Sat, 24 Jul 2021 09:20:27 +0200
Christoph Hellwig <hch@xxxxxx> wrote:

> Merge the ioctl handling in block/scsi_ioctl.c into its only caller in
> drivers/scsi/scsi_ioctl.c.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>


Hi Christoph!

I believe there is a small problem with this patch. I think it is
easiest to explain with the diff that fixes it. Please see the patch
at the end of this email.

Otherwise your patch looks great!

This may or may not be related to the problem reported here:
https://lkml.org/lkml/2021/7/29/157
Adding Oliver, maybe he can test if this fixes his testcases as well.
(It did fix ours.:)

If you like I can respin my fix with an extended patch description.

-----------------------8<-------------------------------------------
From: Halil Pasic <pasic@xxxxxxxxxxxxx>
Date: Mon, 23 Aug 2021 08:11:53 +0200
Subject: [PATCH] scsi: scsi_ioctl: fix error code propagation in SG_IO

Fixes: f2542a3be327 ("scsi: scsi_ioctl: Move the "block layer" SCSI
ioctl handling to drivers/scsi")
Signed-off-by: Halil Pasic <pasic@xxxxxxxxxxxxx>
---
 drivers/scsi/scsi_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 2c4cdd0fc26e..dbb24a3720ac 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -952,7 +952,7 @@ int scsi_ioctl(struct scsi_device *sdev, struct gendisk *disk, fmode_t mode,

                if (put_sg_io_hdr(&hdr, arg))
                        return -EFAULT;
-               return 0;
+               return error;
        }
        case SCSI_IOCTL_SEND_COMMAND:
                return sg_scsi_ioctl(q, disk, mode, arg);
-- 
2.31.1



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux