diff options
author | peter <peter@FreeBSD.org> | 2001-01-23 09:43:23 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-01-23 09:43:23 +0000 |
commit | ac8d71e32602d4a304ef9b20a03d6ea134659c82 (patch) | |
tree | bc71f92d37237ad1f6ca68c0bdecb7970d1c832b /sys/dev/acpica | |
parent | 43d15f8b7a73130f32808d82e23dca9c36eacffa (diff) | |
download | FreeBSD-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.c | 5 |
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; |