
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> stable inclusion from stable-v5.10.207 commit 6963d049a422693bfeffe0112183481a0a0ea328 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8ZD3X CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v... ------------------------- This reverts commit 9db5239d7533c841dcd7a36700f829f6ee96a76d which is commit 066c5b46b6eaf2f13f80c19500dbb3b84baabb33 upstream. As reported, a lot of scsi changes were made just to resolve a 2 line patch, so let's revert them all and then manually fix up the 2 line fixup so that things are simpler and potential abi changes are not an issue. Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz Reported-by: Pavel Machek <pavel@ucw.cz> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Ming Lei <ming.lei@redhat.com> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> --- drivers/scsi/scsi_error.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 30eb8769dbab..93374173b957 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1068,7 +1068,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, scsi_log_send(scmd); scmd->submitter = SUBMITTED_BY_SCSI_ERROR_HANDLER; - scmd->flags |= SCMD_LAST; /* * Lock sdev->state_mutex to avoid that scsi_device_quiesce() can @@ -2360,7 +2359,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) scmd->cmnd = scsi_req(rq)->cmd; scmd->submitter = SUBMITTED_BY_SCSI_RESET_IOCTL; - scmd->flags |= SCMD_LAST; memset(&scmd->sdb, 0, sizeof(scmd->sdb)); scmd->cmd_len = 0; -- 2.31.1