if_attach should not sleep; change malloc's M_WAITOK to M_NOWAIT

This commit is contained in:
Sam Leffler 2002-11-15 18:35:41 +00:00
parent d4cd548bb1
commit 10ed96fd9c

View File

@ -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;