From ec84f30ddd36ba31c0399c0019ecd98ef4751a6d Mon Sep 17 00:00:00 2001 From: oster Date: Thu, 13 Jan 2000 23:41:18 +0000 Subject: [PATCH] If we can't malloc a RF_ShutdownList then we should return ENOMEM right away. Waiting for more kernel memory to come along can cause more problems than we're willing to deal with right now. --- sys/dev/raidframe/rf_shutdown.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/raidframe/rf_shutdown.c b/sys/dev/raidframe/rf_shutdown.c index e76d95967eaf..5384b680f356 100644 --- a/sys/dev/raidframe/rf_shutdown.c +++ b/sys/dev/raidframe/rf_shutdown.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_shutdown.c,v 1.5 2000/01/08 22:57:31 oster Exp $ */ +/* $NetBSD: rf_shutdown.c,v 1.6 2000/01/13 23:41:18 oster Exp $ */ /* * rf_shutdown.c */ @@ -59,7 +59,10 @@ _rf_ShutdownCreate( * Have to directly allocate memory here, since we start up before * and shutdown after RAIDframe internal allocation system. */ - ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), M_RAIDFRAME, M_WAITOK); + /* ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), + M_RAIDFRAME, M_WAITOK); */ + ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), + M_RAIDFRAME, M_NOWAIT); if (ent == NULL) return (ENOMEM); ent->cleanup = cleanup;