Bug 14096

Summary: ACPI explodes in -next (ACPI video it seems)
Product: ACPI Reporter: Alan Jenkins (alan-jenkins)
Component: Power-VideoAssignee: acpi_power-video
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: lenb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: linux-next Subsystem:
Regression: No Bisected commit-id:

Description Alan Jenkins 2009-08-31 10:51:49 UTC
This was still present in yesterdays acpi-test tree.


References: http://lkml.org/lkml/2009/7/20/422
Submitter:  Alan Cox <alan@lxorguk.ukuu.org.uk>
Patch:      http://userweb.kernel.org/~akpm/mmotm/broken-out/acpi-fix-null-bug-for-hid-uid-string-2.patch

<quote>
Trace is during a modprobe

strcmp of NULL pointer from
acpi_device_probe + 0xA3/0x123
driver_probe_device
__driver_attach
bus_for_each_dev
driver_attach
__driver_attach
bus_add_driver
driver_register
acpi_bus_register_driver
acpi_video_register [video]
acpi_video_init [video]
_stext + 49
acpi_video_init + 0x0
..
..
sys_init_module

/sbin/modprobe -b acpi:LNXVIDEO: abnormal exit

</quote>
Comment 1 Len Brown 2009-09-01 02:12:47 UTC
patch applied:

commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128
Author: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Date:   Thu Aug 6 23:18:12 2009 +0000

    ACPI: fix NULL bug for HID/UID string
    
    acpi_device->pnp.hardware_id and unique_id are now allocated pointers,
    replacing the previous arrays.  acpi_device_install_notify_handler()
    oopsed on the NULL hid when probing the video device, and perhaps other
    uses are vulnerable too.  So initialize those pointers to empty strings
    when there is no hid or uid.  Also, free hardware_id and unique_id when
    when acpi_device is going to be freed.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=14096
    
    Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
    Signed-off-by: Lin Ming <ming.m.lin@intel.com>
    Signed-off-by: Len Brown <len.brown@intel.com>
Comment 2 Len Brown 2009-09-24 21:42:55 UTC
shipped in linux-2.6.31-git14