This is a note to let you know that I've just added the patch titled

    usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 
systems

to the 3.4-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:
     
usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 457a73d346187c2cc5d599072f38676f18f130e0 Mon Sep 17 00:00:00 2001
From: Vivek Gautam <[email protected]>
Date: Sat, 22 Sep 2012 18:11:19 +0530
Subject: usb: host: xhci: Fix Null pointer dereferencing with 71c731a for 
non-x86 systems

From: Vivek Gautam <[email protected]>

commit 457a73d346187c2cc5d599072f38676f18f130e0 upstream.

In 71c731a: usb: host: xhci: Fix Compliance Mode on SN65LVPE502CP Hardware
when extracting DMI strings (vendor or product_name) to mark them as quirk
we may get NULL pointer in case of non-x86 systems which won't define
CONFIG_DMI. Hence susbsequent strstr() calls crash while driver probing.

So, returning 'false' here in case we get a NULL vendor or product_name.

This is tested with ARM (exynos) system.

This patch should be backported to stable kernels as old as 3.6, that
contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"

Signed-off-by: Vivek Gautam <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
Reported-by: Sebastian Gottschall (DD-WRT) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/host/xhci.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -470,6 +470,8 @@ static bool compliance_mode_recovery_tim
 
        dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
        dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
+       if (!dmi_product_name || !dmi_sys_vendor)
+               return false;
 
        if (!(strstr(dmi_sys_vendor, "Hewlett-Packard")))
                return false;


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.4/usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to