Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-06-24 09:36:42 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-06-24 09:37:04 +0200
commitb36c370c06996d6dd07b817fecb8c7b0253f75d4 (patch)
treec52a4bef3bbc192af451997a2dc3ca771267fb61
parentcc81168eaaebf98e103e39e45d3a3856f801206a (diff)
scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from
port_remove (bsc#1051510).
-rw-r--r--patches.fixes/scsi-zfcp-fix-missing-zfcp_port-reference-put-on-ebusy-from-port_remove33
-rw-r--r--series.conf1
2 files changed, 34 insertions, 0 deletions
diff --git a/patches.fixes/scsi-zfcp-fix-missing-zfcp_port-reference-put-on-ebusy-from-port_remove b/patches.fixes/scsi-zfcp-fix-missing-zfcp_port-reference-put-on-ebusy-from-port_remove
new file mode 100644
index 0000000000..5ab2d2ec28
--- /dev/null
+++ b/patches.fixes/scsi-zfcp-fix-missing-zfcp_port-reference-put-on-ebusy-from-port_remove
@@ -0,0 +1,33 @@
+From: Steffen Maier <maier@linux.ibm.com>
+Date: Thu, 23 May 2019 15:23:45 +0200
+Subject: scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from
+ port_remove
+Git-commit: d27e5e07f9c49bf2a6a4ef254ce531c1b4fb5a38
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+With this early return due to zfcp_unit child(ren), we don't use the
+zfcp_port reference from the earlier zfcp_get_port_by_wwpn() anymore and
+need to put it.
+
+Signed-off-by: Steffen Maier <maier@linux.ibm.com>
+Fixes: d99b601b6338 ("[SCSI] zfcp: restore refcount check on port_remove")
+Cc: <stable@vger.kernel.org> #3.7+
+Reviewed-by: Jens Remus <jremus@linux.ibm.com>
+Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ drivers/s390/scsi/zfcp_sysfs.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/s390/scsi/zfcp_sysfs.c
++++ b/drivers/s390/scsi/zfcp_sysfs.c
+@@ -263,6 +263,7 @@ static ssize_t zfcp_sysfs_port_remove_st
+ if (atomic_read(&port->units) > 0) {
+ retval = -EBUSY;
+ mutex_unlock(&zfcp_sysfs_port_units_mutex);
++ put_device(&port->dev); /* undo zfcp_get_port_by_wwpn() */
+ goto out;
+ }
+ /* port is about to be removed, so no more unit_add */
diff --git a/series.conf b/series.conf
index 8fdcd197db..bc20e7d29b 100644
--- a/series.conf
+++ b/series.conf
@@ -22560,6 +22560,7 @@
patches.fixes/PCI-PM-Avoid-possible-suspend-to-idle-issue.patch
patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch
patches.suse/kernel-signal.c-trace_signal_deliver-when-signal_gro.patch
+ patches.fixes/scsi-zfcp-fix-missing-zfcp_port-reference-put-on-ebusy-from-port_remove
patches.drivers/leds-avoid-flush_work-in-atomic-context.patch
patches.drivers/i2c-dev-fix-potential-memory-leak-in-i2cdev_ioctl_rd.patch
patches.arch/KVM-PPC-Book3S-HV-XIVE-Do-not-clear-IRQ-data-of-pass.patch