From 9f3e2250ca7f3bac10e5ed5c92603e4c18cb7a65 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 23 Jan 2001 09:43:23 +0000 Subject: [PATCH] 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. --- sys/dev/acpica/Osd/OsdSchedule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index 42ef54d1b166..02d0997813a2 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;