diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-24 12:28:25 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-24 12:28:25 -0400 |
commit | a125d4d5684b1c32695c80262c6152069cc46d61 (patch) | |
tree | 9b104144265bc474cbbf85d0d57f896c7551962f | |
parent | f6691b73f3ce22360ccec869a6191e8a0fcc16dd (diff) | |
download | longterm-queue-4.12-a125d4d5684b1c32695c80262c6152069cc46d61.tar.gz |
scsi: drop patch breaking build
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/scsi-hisi_sas-fix-the-risk-of-freeing-slot-twice.patch | 65 | ||||
-rw-r--r-- | queue/series | 1 |
2 files changed, 0 insertions, 66 deletions
diff --git a/queue/scsi-hisi_sas-fix-the-risk-of-freeing-slot-twice.patch b/queue/scsi-hisi_sas-fix-the-risk-of-freeing-slot-twice.patch deleted file mode 100644 index c04161d..0000000 --- a/queue/scsi-hisi_sas-fix-the-risk-of-freeing-slot-twice.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 3a85b595fcd05d391390ceca72921e71851ceb8f Mon Sep 17 00:00:00 2001 -From: Xiaofei Tan <tanxiaofei@huawei.com> -Date: Tue, 24 Oct 2017 23:51:38 +0800 -Subject: [PATCH] scsi: hisi_sas: fix the risk of freeing slot twice - -commit 6ba0fbc35aa9f3bc8c12be3b4047055c9ce2ac92 upstream. - -The function hisi_sas_slot_task_free() is used to free the slot and do -tidy-up of LLDD resources. The LLDD generally should know the state of -a slot and decide when to free it, and it should only be done once. - -For some scenarios, we really don't know the state, like when TMF -timeout. In this case, we check task->lldd_task before calling -hisi_sas_slot_task_free(). - -However, we may miss some scenarios when we should also check -task->lldd_task, and it is not SMP safe to check task->lldd_task as we -don't protect it within spin lock. - -This patch is to fix this risk of freeing slot twice, as follows: - - 1. Check task->lldd_task in the hisi_sas_slot_task_free(), and give - up freeing of this time if task->lldd_task is NULL. - - 2. Set slot->buf to NULL after it is freed. - -Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> -Signed-off-by: John Garry <john.garry@huawei.com> -Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> -Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> - -diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c -index d622db502ec9..a498076282b3 100644 ---- a/drivers/scsi/hisi_sas/hisi_sas_main.c -+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c -@@ -83,13 +83,16 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, - struct domain_device *device = task->dev; - struct hisi_sas_device *sas_dev = device->lldd_dev; - -+ if (!task->lldd_task) -+ return; -+ -+ task->lldd_task = NULL; -+ - if (!sas_protocol_ata(task->task_proto)) - if (slot->n_elem) - dma_unmap_sg(dev, task->scatter, slot->n_elem, - task->data_dir); - -- task->lldd_task = NULL; -- - if (sas_dev) - atomic64_dec(&sas_dev->running_req); - } -@@ -107,6 +110,7 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, - slot->sge_page_dma); - - list_del_init(&slot->entry); -+ slot->buf = NULL; - slot->task = NULL; - slot->port = NULL; - hisi_sas_slot_index_free(hisi_hba, slot->idx); --- -2.15.0 - diff --git a/queue/series b/queue/series index 9cee801..e041488 100644 --- a/queue/series +++ b/queue/series @@ -83,7 +83,6 @@ xfs-fix-log-block-underflow-during-recovery-cycle-ve.patch xfs-fix-incorrect-extent-state-in-xfs_bmap_add_exten.patch RDMA-cxgb4-Declare-stag-as-__be32.patch PCI-Detach-driver-before-procfs-sysfs-teardown-on-de.patch -scsi-hisi_sas-fix-the-risk-of-freeing-slot-twice.patch scsi-hpsa-cleanup-sas_phy-structures-in-sysfs-when-u.patch scsi-hpsa-destroy-sas-transport-properties-before-sc.patch mfd-mxs-lradc-Fix-error-handling-in-mxs_lradc_probe.patch |