summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-01-23 09:43:23 +0000
committerpeter <peter@FreeBSD.org>2001-01-23 09:43:23 +0000
commitac8d71e32602d4a304ef9b20a03d6ea134659c82 (patch)
treebc71f92d37237ad1f6ca68c0bdecb7970d1c832b /sys/dev/acpica
parent43d15f8b7a73130f32808d82e23dca9c36eacffa (diff)
downloadFreeBSD-src-ac8d71e32602d4a304ef9b20a03d6ea134659c82.zip
FreeBSD-src-ac8d71e32602d4a304ef9b20a03d6ea134659c82.tar.gz
In answer to the comment: /* XXX is it OK to block here? */, the answer
is definately NO! as we are in interrupt context and malloc() does a KASSERT() to be sure.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index 42ef54d..02d0997 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -64,8 +64,9 @@ AcpiOsQueueForExecution(UINT32 Priority, OSD_EXECUTION_CALLBACK Function, void *
if (Function == NULL)
return(AE_BAD_PARAMETER);
- /* XXX is it OK to block here? */
- at = malloc(sizeof(*at), M_ACPITASK, M_WAITOK);
+ at = malloc(sizeof(*at), M_ACPITASK, M_NOWAIT); /* Interrupt Context */
+ if (at == NULL)
+ return(AE_NO_MEMORY);
bzero(at, sizeof(*at));
at->at_function = Function;
OpenPOWER on IntegriCloud