Bjorn Helgaas 67fe63b071 agp/hp: fixup hp agp after ACPI changes
Commit 15b8dd53f5ffa changed the string in info->hardware_id from a static
array to a pointer and added a length field.  But instead of changing
"sizeof(array)" to "length", we changed it to "sizeof(length)" (== 4),
which corrupts the string we're trying to null-terminate.

We no longer even need to null-terminate the string, but we *do* need to
check whether we found a HID.  If there's no HID, we used to have an empty
array, but now we have a null pointer.

The combination of these defects causes this oops:

  Unable to handle kernel NULL pointer dereference (address 0000000000000003)
  modprobe[895]: Oops 8804682956800 [1]
  ip is at zx1_gart_probe+0xd0/0xcc0 [hp_agp]

  http://marc.info/?l=linux-ia64&m=126264484923647&w=2

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reported-by: Émeric Maschino <emeric.maschino@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11 15:09:02 +10:00
..
2009-11-19 18:18:17 -05:00
2009-12-01 16:32:20 -08:00
2009-11-04 14:04:06 +01:00
2009-12-01 16:32:19 -08:00
2009-09-24 07:21:05 -07:00
2009-12-01 11:24:19 +01:00
2009-11-26 09:22:33 +01:00
2009-11-16 16:13:35 +00:00
2009-10-15 09:58:27 -06:00
2009-11-12 07:26:01 -08:00
2009-11-30 16:39:42 -08:00
2009-10-04 22:53:41 +02:00
2009-10-04 15:05:10 -07:00
2009-09-23 10:07:49 -07:00