summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet6/in6.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index b17eaa1..9a5b404 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -894,8 +894,13 @@ in6_update_ifa(ifp, ifra, ia)
*/
if (ia == NULL) {
hostIsNew = 1;
+ /*
+ * When in6_update_ifa() is called in a process of a received
+ * RA, it is called under splnet(). So, we should call malloc
+ * with M_NOWAIT.
+ */
ia = (struct in6_ifaddr *)
- malloc(sizeof(*ia), M_IFADDR, M_WAITOK);
+ malloc(sizeof(*ia), M_IFADDR, M_NOWAIT);
if (ia == NULL)
return (ENOBUFS);
bzero((caddr_t)ia, sizeof(*ia));
OpenPOWER on IntegriCloud