Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347555

[PATCH 3.14 113/130] ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 3.14 113/130] ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
Date 2016-03-02 02:50 +0100
Message-ID <r845m-yf-63@gated-at.bofh.it> (permalink)
References <r82dd-7Iy-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Insu Yun <wuninsu@gmail.com>

commit 2c3033a0664dfae91e1dee7fabac10f24354b958 upstream.

In acpiphp_enable_slot(), there is a missing unlock path
when error occurred.  It needs to be unlocked before returning
an error.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/hotplug/acpiphp_glue.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1133,8 +1133,10 @@ int acpiphp_enable_slot(struct acpiphp_s
 {
 	pci_lock_rescan_remove();
 
-	if (slot->flags & SLOT_IS_GOING_AWAY)
+	if (slot->flags & SLOT_IS_GOING_AWAY) {
+		pci_unlock_rescan_remove();
 		return -ENODEV;
+	}
 
 	mutex_lock(&slot->crit_sect);
 	/* configure all functions */

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.14 113/130] ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 02:50 +0100

csiph-web