From: Matthew Wilcox <willy-+nN6oZZ19oAAvxtiuMwx3w@public.gmane.org>
To: acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org
Subject: [PATCH] Sleeping in interrupt context
Date: Fri, 6 Sep 2002 10:13:42 -0600 [thread overview]
Message-ID: <20020906161342.GA20665@ldl.fc.hp.com> (raw)
We're using GFP_KERNEL where we should be using GFP_ATOMIC in
acpi_bus_generate_event(). Here's a route to it:
Find an ACPI button:
acpi_button_add
|-> acpi_install_fixed_event_handler(acpi_button_notify);
|-> acpi_gbl_fixed_event_handlers[event].handler =
acpi_button_notify
Get an interrupt:
acpi_ev_sci_handler
|-> acpi_ev_fixed_event_detect
|-> acpi_ev_fixed_event_dispatch
|-> acpi_gbl_fixed_event_handlers[event].handler
|-> acpi_button_notify
|-> acpi_bus_generate_event
|-> kmalloc(sizeof(struct acpi_bus_event), GFP_KERNEL);
And we get a BUG() if that slab needs a new page. Here's a patch:
Index: drivers/acpi/bus.c
===================================================================
RCS file: /var/cvs/linux/drivers/acpi/bus.c,v
retrieving revision 1.3
diff -u -p -r1.3 bus.c
--- drivers/acpi/bus.c 19 Aug 2002 12:04:38 -0000 1.3
+++ drivers/acpi/bus.c 6 Sep 2002 16:08:35 -0000
@@ -660,7 +660,7 @@ acpi_bus_generate_event (
if (!event_is_open)
return_VALUE(0);
- event = kmalloc(sizeof(struct acpi_bus_event), GFP_KERNEL);
+ event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
if (!event)
return_VALUE(-ENOMEM);
--
Due to broken mail software, I lost 100 email messages between Aug 13 and
Aug 19. If yours was one of them, please resend.
It's always legal to use Linux (TM) systems
http://www.gnu.org/philosophy/why-free.html
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
reply other threads:[~2002-09-06 16:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020906161342.GA20665@ldl.fc.hp.com \
--to=willy-+nn6ozz19oaavxtiumwx3w@public.gmane.org \
--cc=acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org \
/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