From: Greg Kroah-Hartman Date: Tue, 17 Sep 2019 13:12:49 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.14.145~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ef7bab9bc743601756834fc9b72ba85c1ec521b;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: drm-mediatek-mtk_drm_drv.c-add-of_node_put-before-goto.patch revert-bluetooth-btusb-driver-to-enable-the-usb-wakeup-feature.patch --- diff --git a/queue-4.14/drm-mediatek-mtk_drm_drv.c-add-of_node_put-before-goto.patch b/queue-4.14/drm-mediatek-mtk_drm_drv.c-add-of_node_put-before-goto.patch new file mode 100644 index 00000000000..693e6bd926e --- /dev/null +++ b/queue-4.14/drm-mediatek-mtk_drm_drv.c-add-of_node_put-before-goto.patch @@ -0,0 +1,44 @@ +From 165d42c012be69900f0e2f8545626cb9e7d4a832 Mon Sep 17 00:00:00 2001 +From: Nishka Dasgupta +Date: Sat, 6 Jul 2019 19:00:21 +0530 +Subject: drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto + +From: Nishka Dasgupta + +commit 165d42c012be69900f0e2f8545626cb9e7d4a832 upstream. + +Each iteration of for_each_child_of_node puts the previous +node, but in the case of a goto from the middle of the loop, there is +no put, thus causing a memory leak. Hence add an of_node_put before the +goto in two places. +Issue found with Coccinelle. + +Fixes: 119f5173628a (drm/mediatek: Add DRM Driver for Mediatek SoC MT8173) + +Signed-off-by: Nishka Dasgupta +Signed-off-by: CK Hu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c ++++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c +@@ -504,12 +504,15 @@ static int mtk_drm_probe(struct platform + comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; ++ of_node_put(node); + goto err_node; + } + + ret = mtk_ddp_comp_init(dev, node, comp, comp_id, NULL); +- if (ret) ++ if (ret) { ++ of_node_put(node); + goto err_node; ++ } + + private->ddp_comp[comp_id] = comp; + } diff --git a/queue-4.14/revert-bluetooth-btusb-driver-to-enable-the-usb-wakeup-feature.patch b/queue-4.14/revert-bluetooth-btusb-driver-to-enable-the-usb-wakeup-feature.patch new file mode 100644 index 00000000000..f08b55e3a2d --- /dev/null +++ b/queue-4.14/revert-bluetooth-btusb-driver-to-enable-the-usb-wakeup-feature.patch @@ -0,0 +1,57 @@ +From 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Mon, 19 Aug 2019 12:04:08 -0500 +Subject: Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature" + +From: Mario Limonciello + +commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f upstream. + +This reverts commit a0085f2510e8976614ad8f766b209448b385492f. + +This commit has caused regressions in notebooks that support suspend +to idle such as the XPS 9360, XPS 9370 and XPS 9380. + +These notebooks will wakeup from suspend to idle from an unsolicited +advertising packet from an unpaired BLE device. + +In a bug report it was sugggested that this is caused by a generic +lack of LE privacy support. Revert this commit until that behavior +can be avoided by the kernel. + +Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature") +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039 +Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2 +Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/ +CC: Bastien Nocera +CC: Christian Kellner +CC: Sukumar Ghorai +Signed-off-by: Mario Limonciello +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/bluetooth/btusb.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -1124,10 +1124,6 @@ static int btusb_open(struct hci_dev *hd + } + + data->intf->needs_remote_wakeup = 1; +- /* device specific wakeup source enabled and required for USB +- * remote wakeup while host is suspended +- */ +- device_wakeup_enable(&data->udev->dev); + + if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags)) + goto done; +@@ -1191,7 +1187,6 @@ static int btusb_close(struct hci_dev *h + goto failed; + + data->intf->needs_remote_wakeup = 0; +- device_wakeup_disable(&data->udev->dev); + usb_autopm_put_interface(data->intf); + + failed: diff --git a/queue-4.14/series b/queue-4.14/series index 6bd0758c5c1..04a255c6d9a 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -38,3 +38,5 @@ crypto-talitos-fix-ecb-algs-ivsize.patch crypto-talitos-do-not-modify-req-cryptlen-on-decryption.patch crypto-talitos-hmac-snoop-no-afeu-mode-requires-sw-icv-checking.patch firmware-ti_sci-always-request-response-from-firmware.patch +drm-mediatek-mtk_drm_drv.c-add-of_node_put-before-goto.patch +revert-bluetooth-btusb-driver-to-enable-the-usb-wakeup-feature.patch