lkml.org 
[lkml]   [2004]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: OOPS : 2.4.27-pre2 + latest ACPI
    Sergey Vlasov wrote:

    >
    > Looks like a free memory access - at acpi_button_remove() button->handle
    > was trashed by 0x5a5a5a5a.
    >
    > Does the patch below (on top of the new ACPI changes) fix this? Seems
    > that the special handling for fixed-feature buttons is unneeded at least
    > for 2.4.x - acpi_bus_unregister_driver() works for them.
    >
    >
    > --- linux/drivers/acpi/button.c.button-rmmod-oops 2004-05-09 19:45:09 +0400
    > +++ linux/drivers/acpi/button.c 2004-05-10 21:18:56 +0400
    > @@ -69,8 +69,6 @@
    > -------------------------------------------------------------------------- */
    >
    > static struct proc_dir_entry *acpi_button_dir;
    > -extern struct acpi_device *acpi_fixed_pwr_button;
    > -extern struct acpi_device *acpi_fixed_sleep_button;
    >
    > static int
    > acpi_button_read_info (
    > @@ -514,12 +512,6 @@
    > {
    > ACPI_FUNCTION_TRACE("acpi_button_exit");
    >
    > - if(acpi_fixed_pwr_button)
    > - acpi_button_remove(acpi_fixed_pwr_button, ACPI_BUS_TYPE_POWER_BUTTON);
    > -
    > - if(acpi_fixed_sleep_button)
    > - acpi_button_remove(acpi_fixed_sleep_button, ACPI_BUS_TYPE_SLEEP_BUTTON);
    > -
    > acpi_bus_unregister_driver(&acpi_button_driver);
    >
    > remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
    > --- linux/drivers/acpi/bus.c.button-rmmod-oops 2004-05-09 19:45:09 +0400
    > +++ linux/drivers/acpi/bus.c 2004-05-10 21:21:06 +0400
    > @@ -1769,23 +1769,15 @@
    > }
    >
    >
    > -struct acpi_device *acpi_fixed_pwr_button;
    > -struct acpi_device *acpi_fixed_sleep_button;
    > -
    > -EXPORT_SYMBOL(acpi_fixed_pwr_button);
    > -EXPORT_SYMBOL(acpi_fixed_sleep_button);
    > -
    > static int
    > acpi_bus_scan_fixed (
    > struct acpi_device *root)
    > {
    > int result = 0;
    > + struct acpi_device *device = NULL;
    >
    > ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed");
    >
    > - acpi_fixed_pwr_button = NULL;
    > - acpi_fixed_sleep_button = NULL;
    > -
    > if (!root)
    > return_VALUE(-ENODEV);
    >
    > @@ -1793,11 +1785,11 @@
    > * Enumerate all fixed-feature devices.
    > */
    > if (acpi_fadt.pwr_button == 0)
    > - result = acpi_bus_add(&acpi_fixed_pwr_button, acpi_root,
    > + result = acpi_bus_add(&device, acpi_root,
    > NULL, ACPI_BUS_TYPE_POWER_BUTTON);
    >
    > if (acpi_fadt.sleep_button == 0)
    > - result = acpi_bus_add(&acpi_fixed_sleep_button, acpi_root,
    > + result = acpi_bus_add(&device, acpi_root,
    > NULL, ACPI_BUS_TYPE_SLEEP_BUTTON);
    >
    > return_VALUE(result);


    Yes, this patch cures the oops. Thank you very much.

    Best regards;
    Özkan Sezer

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:3.195 / U:1.384 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site