]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
authorVivek Gautam <gautam.vivek@samsung.com>
Sat, 22 Sep 2012 12:41:19 +0000 (18:11 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:53 +0000 (03:48 +0100)
commit47fe88540de43b9ee65f1c1e52483ce2f0e77968
tree7ef82418abf113a2a71d918404057661b230820c
parent2d74f106e8696f8c629324f7630be5fa0fc15bbc
usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems

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 <gautam.vivek@samsung.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Sebastian Gottschall (DD-WRT) <s.gottschall@dd-wrt.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/xhci.c