From: Sasha Levin Date: Mon, 16 Dec 2019 14:54:45 +0000 (-0500) Subject: Fix up patch mismatch X-Git-Tag: v5.4.4~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c28c5ab04d7084cd3367a12ebaee4db5a5b1fb99;p=thirdparty%2Fkernel%2Fstable-queue.git Fix up patch mismatch Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch-16108 b/queue-4.14/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch-16108 deleted file mode 100644 index 5caa5be3aa9..00000000000 --- a/queue-4.14/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch-16108 +++ /dev/null @@ -1,50 +0,0 @@ -From 3672b35899e72e87981b9658152a8d3729cf61de Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 11 Dec 2019 16:20:02 +0200 -Subject: scsi: qla2xxx: Fix message indicating vectors used by driver - -From: Mika Westerberg - -[ Upstream commit 16561db45eec03368cbfcf96ab11faf59fca58a9 ] - -[ Upstream commit da48b82425b8bf999fb9f7c220e967c4d661b5f8 ] - -This patch updates log message which indicates number of vectors used by -the driver instead of displaying failure to get maximum requested -vectors. Driver will always request maximum vectors during -initialization. In the event driver is not able to get maximum requested -vectors, it will adjust the allocated vectors. This is normal and does not -imply failure in driver. - -Signed-off-by: Himanshu Madhani -Reviewed-by: Ewan D. Milne -Reviewed-by: Lee Duncan -Link: https://lore.kernel.org/r/20190830222402.23688-2-hmadhani@marvell.com -Signed-off-by: Martin K. Petersen -Signed-off-by: Sasha Levin ---- - drivers/usb/host/xhci-mem.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c -index b7b55eb82714f..96d7fc8b98fdc 100644 ---- a/drivers/usb/host/xhci-mem.c -+++ b/drivers/usb/host/xhci-mem.c -@@ -1866,10 +1866,14 @@ no_bw: - kfree(xhci->port_array); - kfree(xhci->rh_bw); - kfree(xhci->ext_caps); -+ kfree(xhci->usb2_rhub.psi); -+ kfree(xhci->usb3_rhub.psi); - - xhci->usb2_ports = NULL; - xhci->usb3_ports = NULL; - xhci->port_array = NULL; -+ xhci->usb2_rhub.psi = NULL; -+ xhci->usb3_rhub.psi = NULL; - xhci->rh_bw = NULL; - xhci->ext_caps = NULL; - --- -2.20.1 - diff --git a/queue-4.14/series b/queue-4.14/series index da914f21e91..e602300bcc0 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -242,7 +242,7 @@ scsi-qla2xxx-fix-session-lookup-in-qlt_abort_work.patch scsi-qla2xxx-fix-qla24xx_process_bidir_cmd.patch scsi-qla2xxx-always-check-the-qla2x00_wait_for_hba_o.patch scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch -scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch-16108 +xhci-Fix-memory-leak-in-xhci_add_in_port.patch xhci-make-sure-interrupts-are-restored-to-correct-st.patch iio-adis16480-add-debugfs_reg_access-entry.patch phy-renesas-rcar-gen3-usb2-fix-sysfs-interface-of-ro.patch diff --git a/queue-4.14/xhci-Fix-memory-leak-in-xhci_add_in_port.patch b/queue-4.14/xhci-Fix-memory-leak-in-xhci_add_in_port.patch new file mode 100644 index 00000000000..28e25c201e1 --- /dev/null +++ b/queue-4.14/xhci-Fix-memory-leak-in-xhci_add_in_port.patch @@ -0,0 +1,93 @@ +From a76f39d981191a28d705ed27a4f5042652d0406e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 11 Dec 2019 16:20:02 +0200 +Subject: xhci: Fix memory leak in xhci_add_in_port() + +From: Mika Westerberg + +[ Upstream commit ce91f1a43b37463f517155bdfbd525eb43adbd1a ] + +When xHCI is part of Alpine or Titan Ridge Thunderbolt controller and +the xHCI device is hot-removed as a result of unplugging a dock for +example, the driver leaks memory it allocates for xhci->usb3_rhub.psi +and xhci->usb2_rhub.psi in xhci_add_in_port() as reported by kmemleak: + +unreferenced object 0xffff922c24ef42f0 (size 16): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 16 bytes): + 21 00 0c 00 12 00 dc 05 23 00 e0 01 00 00 00 00 !.......#....... + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 +unreferenced object 0xffff922c24ef3318 (size 8): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 8 bytes): + 34 01 05 00 35 41 0a 00 4...5A.. + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 + +Fix this by calling kfree() for the both psi objects in +xhci_mem_cleanup(). + +Cc: # 4.4+ +Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") +Signed-off-by: Mika Westerberg +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20191211142007.8847-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/host/xhci-mem.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c +index 7199e400fbace..19818367ff5c3 100644 +--- a/drivers/usb/host/xhci-mem.c ++++ b/drivers/usb/host/xhci-mem.c +@@ -1940,10 +1940,14 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) + kfree(xhci->port_array); + kfree(xhci->rh_bw); + kfree(xhci->ext_caps); ++ kfree(xhci->usb2_rhub.psi); ++ kfree(xhci->usb3_rhub.psi); + + xhci->usb2_ports = NULL; + xhci->usb3_ports = NULL; + xhci->port_array = NULL; ++ xhci->usb2_rhub.psi = NULL; ++ xhci->usb3_rhub.psi = NULL; + xhci->rh_bw = NULL; + xhci->ext_caps = NULL; + +-- +2.20.1 + diff --git a/queue-4.4/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch b/queue-4.4/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch deleted file mode 100644 index 224822b44b3..00000000000 --- a/queue-4.4/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b40e1cbacfdc79ca5e9885a257f4d68fa16b0732 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 11 Dec 2019 16:20:02 +0200 -Subject: scsi: qla2xxx: Fix message indicating vectors used by driver - -From: Mika Westerberg - -[ Upstream commit 16561db45eec03368cbfcf96ab11faf59fca58a9 ] - -[ Upstream commit da48b82425b8bf999fb9f7c220e967c4d661b5f8 ] - -This patch updates log message which indicates number of vectors used by -the driver instead of displaying failure to get maximum requested -vectors. Driver will always request maximum vectors during -initialization. In the event driver is not able to get maximum requested -vectors, it will adjust the allocated vectors. This is normal and does not -imply failure in driver. - -Signed-off-by: Himanshu Madhani -Reviewed-by: Ewan D. Milne -Reviewed-by: Lee Duncan -Link: https://lore.kernel.org/r/20190830222402.23688-2-hmadhani@marvell.com -Signed-off-by: Martin K. Petersen -Signed-off-by: Sasha Levin ---- - drivers/usb/host/xhci-mem.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c -index 0ec809a35a3f0..c851918a50fe5 100644 ---- a/drivers/usb/host/xhci-mem.c -+++ b/drivers/usb/host/xhci-mem.c -@@ -1928,10 +1928,14 @@ no_bw: - kfree(xhci->port_array); - kfree(xhci->rh_bw); - kfree(xhci->ext_caps); -+ kfree(xhci->usb2_rhub.psi); -+ kfree(xhci->usb3_rhub.psi); - - xhci->usb2_ports = NULL; - xhci->usb3_ports = NULL; - xhci->port_array = NULL; -+ xhci->usb2_rhub.psi = NULL; -+ xhci->usb3_rhub.psi = NULL; - xhci->rh_bw = NULL; - xhci->ext_caps = NULL; - --- -2.20.1 - diff --git a/queue-4.4/series b/queue-4.4/series index 00db89491f8..0c583c7a73e 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -122,7 +122,7 @@ quota-check-that-quota-is-not-dirty-before-release.patch quota-fix-livelock-in-dquot_writeback_dquots.patch scsi-zfcp-trace-channel-log-even-for-fcp-command-res.patch usb-xhci-only-set-d3hot-for-pci-device.patch -scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch +xhci-Fix-memory-leak-in-xhci_add_in_port.patch xhci-make-sure-interrupts-are-restored-to-correct-st.patch iio-adis16480-add-debugfs_reg_access-entry.patch btrfs-fix-negative-subv_writers-counter-and-data-spa.patch diff --git a/queue-4.4/xhci-Fix-memory-leak-in-xhci_add_in_port.patch b/queue-4.4/xhci-Fix-memory-leak-in-xhci_add_in_port.patch new file mode 100644 index 00000000000..28e25c201e1 --- /dev/null +++ b/queue-4.4/xhci-Fix-memory-leak-in-xhci_add_in_port.patch @@ -0,0 +1,93 @@ +From a76f39d981191a28d705ed27a4f5042652d0406e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 11 Dec 2019 16:20:02 +0200 +Subject: xhci: Fix memory leak in xhci_add_in_port() + +From: Mika Westerberg + +[ Upstream commit ce91f1a43b37463f517155bdfbd525eb43adbd1a ] + +When xHCI is part of Alpine or Titan Ridge Thunderbolt controller and +the xHCI device is hot-removed as a result of unplugging a dock for +example, the driver leaks memory it allocates for xhci->usb3_rhub.psi +and xhci->usb2_rhub.psi in xhci_add_in_port() as reported by kmemleak: + +unreferenced object 0xffff922c24ef42f0 (size 16): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 16 bytes): + 21 00 0c 00 12 00 dc 05 23 00 e0 01 00 00 00 00 !.......#....... + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 +unreferenced object 0xffff922c24ef3318 (size 8): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 8 bytes): + 34 01 05 00 35 41 0a 00 4...5A.. + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 + +Fix this by calling kfree() for the both psi objects in +xhci_mem_cleanup(). + +Cc: # 4.4+ +Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") +Signed-off-by: Mika Westerberg +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20191211142007.8847-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/host/xhci-mem.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c +index 7199e400fbace..19818367ff5c3 100644 +--- a/drivers/usb/host/xhci-mem.c ++++ b/drivers/usb/host/xhci-mem.c +@@ -1940,10 +1940,14 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) + kfree(xhci->port_array); + kfree(xhci->rh_bw); + kfree(xhci->ext_caps); ++ kfree(xhci->usb2_rhub.psi); ++ kfree(xhci->usb3_rhub.psi); + + xhci->usb2_ports = NULL; + xhci->usb3_ports = NULL; + xhci->port_array = NULL; ++ xhci->usb2_rhub.psi = NULL; ++ xhci->usb3_rhub.psi = NULL; + xhci->rh_bw = NULL; + xhci->ext_caps = NULL; + +-- +2.20.1 + diff --git a/queue-4.9/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch b/queue-4.9/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch deleted file mode 100644 index f1d811d7d2d..00000000000 --- a/queue-4.9/scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 5a472be91a16af349e4c738ad651a988d04a1faf Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 11 Dec 2019 16:20:02 +0200 -Subject: scsi: qla2xxx: Fix message indicating vectors used by driver - -From: Mika Westerberg - -[ Upstream commit 16561db45eec03368cbfcf96ab11faf59fca58a9 ] - -[ Upstream commit da48b82425b8bf999fb9f7c220e967c4d661b5f8 ] - -This patch updates log message which indicates number of vectors used by -the driver instead of displaying failure to get maximum requested -vectors. Driver will always request maximum vectors during -initialization. In the event driver is not able to get maximum requested -vectors, it will adjust the allocated vectors. This is normal and does not -imply failure in driver. - -Signed-off-by: Himanshu Madhani -Reviewed-by: Ewan D. Milne -Reviewed-by: Lee Duncan -Link: https://lore.kernel.org/r/20190830222402.23688-2-hmadhani@marvell.com -Signed-off-by: Martin K. Petersen -Signed-off-by: Sasha Levin ---- - drivers/usb/host/xhci-mem.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c -index 7199e400fbace..19818367ff5c3 100644 ---- a/drivers/usb/host/xhci-mem.c -+++ b/drivers/usb/host/xhci-mem.c -@@ -1940,10 +1940,14 @@ no_bw: - kfree(xhci->port_array); - kfree(xhci->rh_bw); - kfree(xhci->ext_caps); -+ kfree(xhci->usb2_rhub.psi); -+ kfree(xhci->usb3_rhub.psi); - - xhci->usb2_ports = NULL; - xhci->usb3_ports = NULL; - xhci->port_array = NULL; -+ xhci->usb2_rhub.psi = NULL; -+ xhci->usb3_rhub.psi = NULL; - xhci->rh_bw = NULL; - xhci->ext_caps = NULL; - --- -2.20.1 - diff --git a/queue-4.9/series b/queue-4.9/series index 8d5f8999954..1015f65b2ac 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -147,7 +147,7 @@ ext2-check-err-when-partial-null.patch quota-fix-livelock-in-dquot_writeback_dquots.patch scsi-zfcp-trace-channel-log-even-for-fcp-command-res.patch usb-xhci-only-set-d3hot-for-pci-device.patch -scsi-qla2xxx-fix-message-indicating-vectors-used-by-.patch +xhci-Fix-memory-leak-in-xhci_add_in_port.patch xhci-make-sure-interrupts-are-restored-to-correct-st.patch iio-adis16480-add-debugfs_reg_access-entry.patch btrfs-fix-negative-subv_writers-counter-and-data-spa.patch diff --git a/queue-4.9/xhci-Fix-memory-leak-in-xhci_add_in_port.patch b/queue-4.9/xhci-Fix-memory-leak-in-xhci_add_in_port.patch new file mode 100644 index 00000000000..28e25c201e1 --- /dev/null +++ b/queue-4.9/xhci-Fix-memory-leak-in-xhci_add_in_port.patch @@ -0,0 +1,93 @@ +From a76f39d981191a28d705ed27a4f5042652d0406e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 11 Dec 2019 16:20:02 +0200 +Subject: xhci: Fix memory leak in xhci_add_in_port() + +From: Mika Westerberg + +[ Upstream commit ce91f1a43b37463f517155bdfbd525eb43adbd1a ] + +When xHCI is part of Alpine or Titan Ridge Thunderbolt controller and +the xHCI device is hot-removed as a result of unplugging a dock for +example, the driver leaks memory it allocates for xhci->usb3_rhub.psi +and xhci->usb2_rhub.psi in xhci_add_in_port() as reported by kmemleak: + +unreferenced object 0xffff922c24ef42f0 (size 16): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 16 bytes): + 21 00 0c 00 12 00 dc 05 23 00 e0 01 00 00 00 00 !.......#....... + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 +unreferenced object 0xffff922c24ef3318 (size 8): + comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) + hex dump (first 8 bytes): + 34 01 05 00 35 41 0a 00 4...5A.. + backtrace: + [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 + [<0000000001b6d775>] xhci_init+0x7c/0x160 + [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 + [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 + [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 + [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 + [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 + [<00000000b9231f25>] local_pci_probe+0x3d/0x70 + [<000000006385c9d7>] pci_device_probe+0xd0/0x150 + [<0000000070241068>] really_probe+0xf5/0x3c0 + [<0000000061f35c0a>] driver_probe_device+0x58/0x100 + [<000000009da11198>] bus_for_each_drv+0x79/0xc0 + [<000000009ce45f69>] __device_attach+0xda/0x160 + [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 + [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 + [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 + +Fix this by calling kfree() for the both psi objects in +xhci_mem_cleanup(). + +Cc: # 4.4+ +Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") +Signed-off-by: Mika Westerberg +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20191211142007.8847-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/host/xhci-mem.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c +index 7199e400fbace..19818367ff5c3 100644 +--- a/drivers/usb/host/xhci-mem.c ++++ b/drivers/usb/host/xhci-mem.c +@@ -1940,10 +1940,14 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) + kfree(xhci->port_array); + kfree(xhci->rh_bw); + kfree(xhci->ext_caps); ++ kfree(xhci->usb2_rhub.psi); ++ kfree(xhci->usb3_rhub.psi); + + xhci->usb2_ports = NULL; + xhci->usb3_ports = NULL; + xhci->port_array = NULL; ++ xhci->usb2_rhub.psi = NULL; ++ xhci->usb3_rhub.psi = NULL; + xhci->rh_bw = NULL; + xhci->ext_caps = NULL; + +-- +2.20.1 +