Patch "powerpc/pci/rpadlpar: Fix device reference leaks" has been added to the 4.9-stable tree
This is a note to let you know that I've just added the patch titled
powerpc/pci/rpadlpar: Fix device reference leaks
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-pci-rpadlpar-fix-device-reference-leaks.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
99e5cde5eae78bef95bfe7c16ccda87fb070149bMon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Tue, 1 Nov 2016 16:26:03 +0100
Subject: powerpc/pci/rpadlpar: Fix device reference leaks
From: Johan Hovold <[email protected]>
commit 99e5cde5eae78bef95bfe7c16ccda87fb070149b upstream.
Make sure to drop any device reference taken by vio_find_node() when adding and removing virtual I/O slots.
--- drivers/pci/hotplug/rpadlpar_core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/pci/hotplug/rpadlpar_core.c +9 -1
@@ -257,8 +257,13 @@ static int dlpar_add_phb(char *drc_name,static int dlpar_add_vio_slot (char *drc_name,struct device_node *dn) { -if (vio_find_node (dn)) +struct vio_dev *vio_dev; + + vio_dev =vio_find_node (dn); +if (vio_dev) { +put_device (&vio_dev->dev);return -EINVAL ; + }if (!vio_register_device_node (dn)) { printk(KERN_ERR
@@ -334,6 +339,9 @@ static int dlpar_remove_vio_slot(char *dreturn -EINVAL ;vio_unregister_device (vio_dev); + +put_device (&vio_dev->dev); +return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/usb-serial-io_ti-fix-i-o-after-disconnect.patch queue-4.9/usb-serial-ti_usb_3410_5052-fix-null-deref-at-open.patch queue-4.9/usb-serial-kl5kusb105-abort-on-open-exception-path.patch queue-4.9/usb-serial-kobil_sct-fix-null-deref-in-write.patch queue-4.9/usb-serial-spcp8x5-fix-null-deref-at-open.patch queue-4.9/usb-serial-mos7720-fix-parallel-probe.patch queue-4.9/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch queue-4.9/usb-serial-io_ti-bind-to-interface-after-fw-download.patch queue-4.9/usb-serial-cyberjack-fix-null-deref-at-open.patch queue-4.9/usb-serial-mos7720-fix-null-deref-at-open.patch queue-4.9/usb-serial-garmin_gps-fix-memory-leak-on-failed-urb-submit.patch queue-4.9/usb-serial-io_ti-fix-null-deref-at-open.patch queue-4.9/powerpc-pci-rpadlpar-fix-device-reference-leaks.patch queue-4.9/usb-serial-pl2303-fix-null-deref-at-open.patch queue-4.9/usb-serial-quatech2-fix-sleep-while-atomic-in-close.patch queue-4.9/usb-serial-iuu_phoenix-fix-null-deref-at-open.patch queue-4.9/usb-serial-oti6858-fix-null-deref-at-open.patch queue-4.9/usb-serial-io_edgeport-fix-null-deref-at-open.patch queue-4.9/usb-serial-mos7720-fix-parport-use-after-free-on-probe-errors.patch queue-4.9/usb-serial-mos7720-fix-use-after-free-on-probe-errors.patch queue-4.9/usb-serial-mos7840-fix-null-deref-at-open.patch queue-4.9/usb-serial-omninet-fix-null-derefs-at-open-and-disconnect.patch queue-4.9/usb-serial-keyspan_pda-verify-endpoints-at-probe.patch queue-4.9/usb-serial-io_ti-fix-another-null-deref-at-open.patch