From 10ed96fd9cc93cb9be33ef576ebfce4d7d82faae Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 15 Nov 2002 18:35:41 +0000 Subject: [PATCH] if_attach should not sleep; change malloc's M_WAITOK to M_NOWAIT --- sys/net/if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if.c b/sys/net/if.c index 699278bd5f89..4c6df02e1288 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -423,7 +423,7 @@ if_attach(ifp) socksize = sizeof(*sdl); socksize = ROUNDUP(socksize); ifasize = sizeof(*ifa) + 2 * socksize; - ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO); + ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_NOWAIT | M_ZERO); if (ifa) { sdl = (struct sockaddr_dl *)(ifa + 1); sdl->sdl_len = socksize;