summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-07-15 14:24:00 +0000
committerume <ume@FreeBSD.org>2001-07-15 14:24:00 +0000
commite5aac591c67fbbf63002ece46525a1d7c5b1c90f (patch)
tree8f13ba1c27fa71bca5ff5dc11e277f4af645bc1b /sys/netinet6
parentf07b174fb3b3d3eaf87e50929ec1bd9deaab4f64 (diff)
downloadFreeBSD-src-e5aac591c67fbbf63002ece46525a1d7c5b1c90f.zip
FreeBSD-src-e5aac591c67fbbf63002ece46525a1d7c5b1c90f.tar.gz
do not M_WAITOK in in6_update_ifa(), since this function can be called
under splnet(). (some comment was added by KAME) PR: 28927 MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
-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