From: "O.Sezer" <sezero@superonline.com>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: OOPS : 2.4.27-pre2 + latest ACPI
Date: Mon, 10 May 2004 23:25:12 +0300 [thread overview]
Message-ID: <409FE528.3050705@superonline.com> (raw)
In-Reply-To: <pan.2004.05.10.17.34.01.383608@altlinux.ru>
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
prev parent reply other threads:[~2004-05-10 20:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-08 21:27 OOPS : 2.4.27-pre2 + latest ACPI O.Sezer
2004-05-08 21:36 ` O.Sezer
2004-05-09 8:02 ` O.Sezer
[not found] ` <pan.2004.05.10.17.34.01.383608@altlinux.ru>
2004-05-10 20:25 ` O.Sezer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=409FE528.3050705@superonline.com \
--to=sezero@superonline.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vsu@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox