From: Greg Kroah-Hartman Date: Mon, 26 Nov 2018 15:13:54 +0000 (+0100) Subject: drop mtd-rawnand-atmel-fix-of-child-node-lookup.patch from 4.14 X-Git-Tag: v3.18.127~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=861f7e5c1b5ff209af3dea0e10716310bfeea2b1;p=thirdparty%2Fkernel%2Fstable-queue.git drop mtd-rawnand-atmel-fix-of-child-node-lookup.patch from 4.14 --- diff --git a/queue-4.14/mtd-rawnand-atmel-fix-of-child-node-lookup.patch b/queue-4.14/mtd-rawnand-atmel-fix-of-child-node-lookup.patch deleted file mode 100644 index fdc80730d29..00000000000 --- a/queue-4.14/mtd-rawnand-atmel-fix-of-child-node-lookup.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5d1e9c2212ea6b4dd735e4fc3dd6279a365d5d10 Mon Sep 17 00:00:00 2001 -From: Johan Hovold -Date: Mon, 27 Aug 2018 10:21:49 +0200 -Subject: mtd: rawnand: atmel: fix OF child-node lookup - -From: Johan Hovold - -commit 5d1e9c2212ea6b4dd735e4fc3dd6279a365d5d10 upstream. - -Use the new of_get_compatible_child() helper to lookup the nfc child -node instead of using of_find_compatible_node(), which searches the -entire tree from a given start node and thus can return an unrelated -(i.e. non-child) node. - -This also addresses a potential use-after-free (e.g. after probe -deferral) as the tree-wide helper drops a reference to its first -argument (i.e. the node of the device being probed). - -While at it, also fix a related nfc-node reference leak. - -Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") -Cc: stable # 4.11 -Cc: Nicolas Ferre -Cc: Josh Wu -Cc: Boris Brezillon -Signed-off-by: Johan Hovold -Signed-off-by: Boris Brezillon -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mtd/nand/atmel/nand-controller.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - ---- a/drivers/mtd/nand/atmel/nand-controller.c -+++ b/drivers/mtd/nand/atmel/nand-controller.c -@@ -2077,8 +2077,7 @@ atmel_hsmc_nand_controller_legacy_init(s - int ret; - - nand_np = dev->of_node; -- nfc_np = of_find_compatible_node(dev->of_node, NULL, -- "atmel,sama5d3-nfc"); -+ nfc_np = of_get_compatible_child(dev->of_node, "atmel,sama5d3-nfc"); - if (!nfc_np) { - dev_err(dev, "Could not find device node for sama5d3-nfc\n"); - return -ENODEV; -@@ -2492,15 +2491,19 @@ static int atmel_nand_controller_probe(s - } - - if (caps->legacy_of_bindings) { -+ struct device_node *nfc_node; - u32 ale_offs = 21; - - /* - * If we are parsing legacy DT props and the DT contains a - * valid NFC node, forward the request to the sama5 logic. - */ -- if (of_find_compatible_node(pdev->dev.of_node, NULL, -- "atmel,sama5d3-nfc")) -+ nfc_node = of_get_compatible_child(pdev->dev.of_node, -+ "atmel,sama5d3-nfc"); -+ if (nfc_node) { - caps = &atmel_sama5_nand_caps; -+ of_node_put(nfc_node); -+ } - - /* - * Even if the compatible says we are dealing with an diff --git a/queue-4.14/series b/queue-4.14/series index e95e8986b06..4d47534994c 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -54,7 +54,6 @@ usb-quirks-add-no-lpm-quirk-for-raydium-touchscreens.patch usb-quirks-add-delay-init-quirk-for-corsair-k70-lux-rgb.patch misc-atmel-ssc-fix-section-annotation-on-atmel_ssc_get_driver_data.patch usb-misc-appledisplay-add-20-apple-cinema-display.patch -mtd-rawnand-atmel-fix-of-child-node-lookup.patch drivers-misc-sgi-gru-fix-spectre-v1-vulnerability.patch acpi-platform-add-smb0001-hid-to-forbidden_id_list.patch hid-uhid-forbid-uhid_create-under-kernel_ds-or-elevated-privileges.patch