mbox series

[0/2] scsi: libsas: Drop SAS_TASK_AT_INITIATOR

Message ID 1644489804-85730-1-git-send-email-john.garry@huawei.com
Headers show
Series scsi: libsas: Drop SAS_TASK_AT_INITIATOR | expand

Message

John Garry Feb. 10, 2022, 10:43 a.m. UTC
Apart from some isci driver code, flag SAS_TASK_AT_INITIATOR is only set,
so drop usage in that driver and then everywhere else.

This solves a use-after-free in the pm8001 queue path.

John Garry (2):
  scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task()
  scsi: libsas: Drop SAS_TASK_AT_INITIATOR

 drivers/scsi/aic94xx/aic94xx_task.c    |  9 ---------
 drivers/scsi/hisi_sas/hisi_sas_main.c  |  8 +-------
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c |  3 +--
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c |  3 +--
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c |  3 +--
 drivers/scsi/isci/request.c            | 15 +++++----------
 drivers/scsi/isci/request.h            |  5 ++++-
 drivers/scsi/isci/task.c               | 23 +++++++++--------------
 drivers/scsi/mvsas/mv_sas.c            |  6 +-----
 drivers/scsi/pm8001/pm8001_hwi.c       |  7 -------
 drivers/scsi/pm8001/pm8001_sas.c       |  4 ----
 drivers/scsi/pm8001/pm80xx_hwi.c       |  5 -----
 include/scsi/libsas.h                  |  1 -
 13 files changed, 23 insertions(+), 69 deletions(-)

Comments

Martin K. Petersen Feb. 15, 2022, 3:19 a.m. UTC | #1
On Thu, 10 Feb 2022 18:43:22 +0800, John Garry wrote:

> Apart from some isci driver code, flag SAS_TASK_AT_INITIATOR is only set,
> so drop usage in that driver and then everywhere else.
> 
> This solves a use-after-free in the pm8001 queue path.
> 
> John Garry (2):
>   scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task()
>   scsi: libsas: Drop SAS_TASK_AT_INITIATOR
> 
> [...]

Applied to 5.18/scsi-queue, thanks!

[1/2] scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task()
      https://git.kernel.org/mkp/scsi/c/c39d5aa457f2
[2/2] scsi: libsas: Drop SAS_TASK_AT_INITIATOR
      https://git.kernel.org/mkp/scsi/c/26fc0ea74fcb