* [PATCH] Sleeping in interrupt context
@ 2002-09-06 16:13 Matthew Wilcox
0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2002-09-06 16:13 UTC (permalink / raw)
To: acpi-devel-pyega4qmqnRoyOMFzWx49A
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-09-06 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06 16:13 [PATCH] Sleeping in interrupt context Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox