OpenSolaris

Printable Version Enter a New Search
Bug ID 6582507
Synopsis ddi_prop_free() error in acpica_get_handle_cpu()
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:pm
Keywords
Responsible Engineer Mark Haywood
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_70
Fixed In snv_70
Release Fixed solaris_nevada(snv_70) , solaris_10u5(s10u5_04) (Bug ID:2154562)
Related Bugs
Submit Date 19-July-2007
Last Update Date 8-November-2007
Description
The following code in acpica_get_handle_cpu() has an obvious bug that could cause
a system panic:

if ((ddi_prop_lookup_string(DDI_DEV_T_ANY, dip, 0,
    "device_type", &device_type_prop) != DDI_PROP_SUCCESS) ||
    (strcmp("cpu", device_type_prop) != 0)) {
        ddi_prop_free(device_type_prop);
        return (AE_ERROR);
}
ddi_prop_free(device_type_prop);

In the case where the ddi_prop_lookup_string() fails, the first ddi_prop_free() would result in a panic. Fortunately, the ddi_prop_lookup_string() should never fail.

*** (#1 of 1): [ UNSAVED ]  xxxxx@xxxxx.com
Work Around
N/A
Comments
N/A