]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
agp/hp: fixup hp agp after ACPI changes
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Thu, 7 Jan 2010 19:58:51 +0000 (12:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:32 +0000 (07:41 -0700)
commit8bb98f7cae996013a2cf1ccd4bc375b8189b52e9
treebc15c1aaff080d8949a5cc33a536cb2a2e2d6723
parentfca6a735cc3b070a25c3fa2b09073ff836307d24
agp/hp: fixup hp agp after ACPI changes

commit 67fe63b0715ccfaefa0af8a6e705c5470ee5cada upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/agp/hp-agp.c