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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1647945585-197349-3-git-send-email-john.garry@huawei.com>
Date:   Tue, 22 Mar 2022 18:39:36 +0800
From:   John Garry <john.garry@...wei.com>
To:     <axboe@...nel.dk>, <damien.lemoal@...nsource.wdc.com>,
        <bvanassche@....org>, <jejb@...ux.ibm.com>,
        <martin.petersen@...cle.com>, <hch@....de>, <ming.lei@...hat.com>,
        <hare@...e.de>
CC:     <chenxiang66@...ilicon.com>, <linux-block@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-ide@...r.kernel.org>,
        <linux-scsi@...r.kernel.org>, <dm-devel@...hat.com>,
        <beanhuo@...ron.com>, John Garry <john.garry@...wei.com>
Subject: [PATCH 02/11] scsi: core: Add SUBMITTED_BY_SCSI_CUSTOM_OPS

Add a new type of submitter, SUBMITTED_BY_SCSI_CUSTOM_OPS, for when a
SCSI cmnd is submitted via the block layer but not by scsi_queue_rq().

Since this is not a true SCSI cmnd we should do nothing for it in
scsi_done_internal().

Signed-off-by: John Garry <john.garry@...wei.com>
---
 drivers/scsi/scsi_lib.c  | 2 ++
 include/scsi/scsi_cmnd.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a7788184908e..d230392f2b4a 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1615,6 +1615,8 @@ static void scsi_done_internal(struct scsi_cmnd *cmd, bool complete_directly)
 		return scsi_eh_done(cmd);
 	case SUBMITTED_BY_SCSI_RESET_IOCTL:
 		return;
+	case SUBMITTED_BY_SCSI_CUSTOM_OPS:
+		return;
 	}
 
 	if (unlikely(blk_should_fake_timeout(scsi_cmd_to_rq(cmd)->q)))
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 76c5eaeeb3b5..ad4bcace1390 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -64,6 +64,7 @@ enum scsi_cmnd_submitter {
 	SUBMITTED_BY_BLOCK_LAYER = 0,
 	SUBMITTED_BY_SCSI_ERROR_HANDLER = 1,
 	SUBMITTED_BY_SCSI_RESET_IOCTL = 2,
+	SUBMITTED_BY_SCSI_CUSTOM_OPS = 3,
 } __packed;
 
 struct scsi_cmnd {
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ