diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-21 15:28:49 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-25 14:24:22 -0400 |
commit | b24715027aab5e586c4ab1d035f3e543307dea69 (patch) | |
tree | 01688402d1694b42f9821e00fc6b4b0913de397f /drivers/pci | |
parent | 53cddfcc0e760d2b364878b6dadbd0c6d087cfae (diff) |
ACPICA: fixup after acpi_get_object_info() change
Commit 15b8dd53f5ffa changed info->hardware_id from a static array to
a pointer. If hardware_id is non-NULL, it points to a NULL-terminated
string, so we don't need to terminate it explicitly. However, it may
be NULL; in that case, we *can't* add a NULL terminator.
This causes a NULL pointer dereference oops for devices without _HID.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Lin Ming <ming.m.lin@intel.com>
CC: Bob Moore <robert.moore@intel.com>
CC: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index a9d926b7d805..e7be66dbac21 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, | |||
406 | __func__, status); | 406 | __func__, status); |
407 | return retval; | 407 | return retval; |
408 | } | 408 | } |
409 | info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; | ||
410 | 409 | ||
411 | if (info->current_status && (info->valid & ACPI_VALID_HID) && | 410 | if (info->current_status && (info->valid & ACPI_VALID_HID) && |
412 | (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || | 411 | (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || |