mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
if_attach should not sleep; change malloc's M_WAITOK to M_NOWAIT
This commit is contained in:
parent
d4cd548bb1
commit
10ed96fd9c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106955
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user