FAILED: patch "[PATCH] usb: host: xhci-plat: fix NULL pointer in probe for device" failed to apply to 4.3-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
2ad294d5f9d13d108c1e2f1a4be8542859ead134Mon Sep 17 00:00:00 2001
From: Gregory CLEMENT <[email protected]>
Date: Tue, 26 Jan 2016 17:50:11 +0200
Subject: [PATCH] usb: host: xhci-plat: fix NULL pointer in probe for device
tree case
During probe, in the device tree case, the data pointer associated to a compatible is dereferenced. However, not all the compatibles are associated to a private data pointer.
The generic-xhci and the xhci-platform don't need them, this patch adds a test on the data pointer before accessing it, avoiding a kernel crash.
drivers/usb/host/xhci-plat.c +2 -1
@@ -184,7 +184,8 @@ static int xhci_plat_probe(struct platform_device *pdev)struct xhci_plat_priv *priv =hcd_to_xhci_priv (hcd);/* Just copy data for now */ - *priv = *priv_match; +if (priv_match) + *priv = *priv_match; }if (xhci_plat_type_is (hcd,XHCI_PLAT_TYPE_MARVELL_ARMADA )) {