Module Name:    src
Committed By:   ozaki-r
Date:           Wed Dec  6 04:00:07 UTC 2017

Modified Files:
        src/sys/net: if_ethersubr.c

Log Message:
Use kmem_alloc instead of kmem_intr_alloc in ether_addmulti

ether_addmulti is now not called in softint thanks to wqinput that
pulled input routines of ICMP out of softint.


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.247 src/sys/net/if_ethersubr.c:1.248
--- src/sys/net/if_ethersubr.c:1.247	Wed Nov 22 04:27:57 2017
+++ src/sys/net/if_ethersubr.c	Wed Dec  6 04:00:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.247 2017/11/22 04:27:57 msaitoh Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.248 2017/12/06 04:00:07 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.247 2017/11/22 04:27:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.248 2017/12/06 04:00:07 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1005,7 +1005,7 @@ ether_ifdetach(struct ifnet *ifp)
 	ETHER_LOCK(ec);
 	while ((enm = LIST_FIRST(&ec->ec_multiaddrs)) != NULL) {
 		LIST_REMOVE(enm, enm_list);
-		kmem_intr_free(enm, sizeof(*enm));
+		kmem_free(enm, sizeof(*enm));
 		ec->ec_multicnt--;
 	}
 	ETHER_UNLOCK(ec);
@@ -1223,8 +1223,7 @@ ether_addmulti(const struct sockaddr *sa
 	int error = 0;
 
 	/* Allocate out of lock */
-	/* XXX still can be called in softint */
-	enm = kmem_intr_alloc(sizeof(*enm), KM_SLEEP);
+	enm = kmem_alloc(sizeof(*enm), KM_SLEEP);
 	if (enm == NULL)
 		return ENOBUFS;
 
@@ -1269,7 +1268,7 @@ ether_addmulti(const struct sockaddr *sa
 out:
 	ETHER_UNLOCK(ec);
 	if (enm != NULL)
-		kmem_intr_free(enm, sizeof(*enm));
+		kmem_free(enm, sizeof(*enm));
 	return error;
 }
 
@@ -1311,7 +1310,7 @@ ether_delmulti(const struct sockaddr *sa
 	ec->ec_multicnt--;
 	ETHER_UNLOCK(ec);
 
-	kmem_intr_free(enm, sizeof(*enm));
+	kmem_free(enm, sizeof(*enm));
 	/*
 	 * Return ENETRESET to inform the driver that the list has changed
 	 * and its reception filter should be adjusted accordingly.

Reply via email to