linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* XHCI Bug discovered in 3.6-RC6
@ 2012-09-18  0:44 Sebastian Gottschall (DD-WRT)
  0 siblings, 0 replies; only message in thread
From: Sebastian Gottschall (DD-WRT) @ 2012-09-18  0:44 UTC (permalink / raw)
  To: linux-kernel

this following function is missing a important NULL check. if DMI is not 
available or not enabled in the kernel config (which is common in my 
case, since its a ARM Platform with XHCI support)
the xhci-hcd driver will crash due nullpointer access since 
dmi_get_system_info returns always NULL if DMI support is not enabled.

proposed patch: simply add  to this function
  if (!dmi_sys_vendor || !dmi_product_name)
         return false;

even better. disable the whole quirk handling for this case if 
CONFIG_DMI is not set

static bool compliance_mode_recovery_timer_quirk_check(void)
{
     const char *dmi_product_name, *dmi_sys_vendor;

     dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
     dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);

     if (!(strstr(dmi_sys_vendor, "Hewlett-Packard")))
         return false;

     if (strstr(dmi_product_name, "Z420") ||
             strstr(dmi_product_name, "Z620") ||
             strstr(dmi_product_name, "Z820"))
         return true;

     return false;
}


-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Berliner Ring 101, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-18  0:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18  0:44 XHCI Bug discovered in 3.6-RC6 Sebastian Gottschall (DD-WRT)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).