Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:10 +0200
commit03f32ba91c28caf2683535334b109554b19c06e5 (patch)
treecd2bced8f7d64ee32b4ad758ae153b9e162d001a
parent16672755ce04d2a0cdb0fb42c985f0dc18439410 (diff)
scsi: ibmvfc: fix WARN_ON during event pool release
-rw-r--r--patches.kernel.org/5.2.9-108-scsi-ibmvfc-fix-WARN_ON-during-event-pool-relea.patch76
-rw-r--r--series.conf1
2 files changed, 77 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-108-scsi-ibmvfc-fix-WARN_ON-during-event-pool-relea.patch b/patches.kernel.org/5.2.9-108-scsi-ibmvfc-fix-WARN_ON-during-event-pool-relea.patch
new file mode 100644
index 0000000000..52d2f3b61a
--- /dev/null
+++ b/patches.kernel.org/5.2.9-108-scsi-ibmvfc-fix-WARN_ON-during-event-pool-relea.patch
@@ -0,0 +1,76 @@
+From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+Date: Wed, 17 Jul 2019 14:48:27 -0500
+Subject: [PATCH] scsi: ibmvfc: fix WARN_ON during event pool release
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: 5578257ca0e21056821e6481bd534ba267b84e58
+
+[ Upstream commit 5578257ca0e21056821e6481bd534ba267b84e58 ]
+
+While removing an ibmvfc client adapter a WARN_ON like the following
+WARN_ON is seen in the kernel log:
+
+WARNING: CPU: 6 PID: 5421 at ./include/linux/dma-mapping.h:541
+ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc]
+CPU: 6 PID: 5421 Comm: rmmod Tainted: G E 4.17.0-rc1-next-20180419-autotest #1
+NIP: d00000000290328c LR: d00000000290325c CTR: c00000000036ee20
+REGS: c000000288d1b7e0 TRAP: 0700 Tainted: G E (4.17.0-rc1-next-20180419-autotest)
+MSR: 800000010282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]> CR: 44008828 XER: 20000000
+CFAR: c00000000036e408 SOFTE: 1
+GPR00: d00000000290325c c000000288d1ba60 d000000002917900 c000000289d75448
+GPR04: 0000000000000071 c0000000ff870000 0000000018040000 0000000000000001
+GPR08: 0000000000000000 c00000000156e838 0000000000000001 d00000000290c640
+GPR12: c00000000036ee20 c00000001ec4dc00 0000000000000000 0000000000000000
+GPR16: 0000000000000000 0000000000000000 00000100276901e0 0000000010020598
+GPR20: 0000000010020550 0000000010020538 0000000010020578 00000000100205b0
+GPR24: 0000000000000000 0000000000000000 0000000010020590 5deadbeef0000100
+GPR28: 5deadbeef0000200 d000000002910b00 0000000000000071 c0000002822f87d8
+NIP [d00000000290328c] ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc]
+LR [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc]
+Call Trace:
+[c000000288d1ba60] [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc] (unreliable)
+[c000000288d1baf0] [d000000002909390] ibmvfc_abort_task_set+0x7b0/0x8b0 [ibmvfc]
+[c000000288d1bb70] [c0000000000d8c68] vio_bus_remove+0x68/0x100
+[c000000288d1bbb0] [c0000000007da7c4] device_release_driver_internal+0x1f4/0x2d0
+[c000000288d1bc00] [c0000000007da95c] driver_detach+0x7c/0x100
+[c000000288d1bc40] [c0000000007d8af4] bus_remove_driver+0x84/0x140
+[c000000288d1bcb0] [c0000000007db6ac] driver_unregister+0x4c/0xa0
+[c000000288d1bd20] [c0000000000d6e7c] vio_unregister_driver+0x2c/0x50
+[c000000288d1bd50] [d00000000290ba0c] cleanup_module+0x24/0x15e0 [ibmvfc]
+[c000000288d1bd70] [c0000000001dadb0] sys_delete_module+0x220/0x2d0
+[c000000288d1be30] [c00000000000b284] system_call+0x58/0x6c
+Instruction dump:
+e8410018 e87f0068 809f0078 e8bf0080 e8df0088 2fa30000 419e008c e9230200
+2fa90000 419e0080 894d098a 794a07e0 <0b0a0000> e9290008 2fa90000 419e0028
+
+This is tripped as a result of irqs being disabled during the call to
+dma_free_coherent() by ibmvfc_free_event_pool(). At this point in the code path
+we have quiesced the adapter and its overly paranoid anyways to be holding the
+host lock.
+
+Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
+Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
+index acd16e0d52cf..8cdbac076a1b 100644
+--- a/drivers/scsi/ibmvscsi/ibmvfc.c
++++ b/drivers/scsi/ibmvscsi/ibmvfc.c
+@@ -4864,8 +4864,8 @@ static int ibmvfc_remove(struct vio_dev *vdev)
+
+ spin_lock_irqsave(vhost->host->host_lock, flags);
+ ibmvfc_purge_requests(vhost, DID_ERROR);
+- ibmvfc_free_event_pool(vhost);
+ spin_unlock_irqrestore(vhost->host->host_lock, flags);
++ ibmvfc_free_event_pool(vhost);
+
+ ibmvfc_free_mem(vhost);
+ spin_lock(&ibmvfc_driver_lock);
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 5e392a2575..4d0f0f9ad6 100644
--- a/series.conf
+++ b/series.conf
@@ -1128,6 +1128,7 @@
patches.kernel.org/5.2.9-105-ARM-davinci-fix-sleep.S-build-error-on-ARMv4.patch
patches.kernel.org/5.2.9-106-ARM-dts-bcm-bcm47094-add-missing-cells-for-mdio.patch
patches.kernel.org/5.2.9-107-scsi-megaraid_sas-fix-panic-on-loading-firmware.patch
+ patches.kernel.org/5.2.9-108-scsi-ibmvfc-fix-WARN_ON-during-event-pool-relea.patch
########################################################
# Build fixes that apply to the vanilla kernel too.