summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-10-07 08:59:51 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-10-07 08:59:51 +0000
commitbaf5fe5271afd1626c789e81292f8b9c68623e51 (patch)
tree070707644a34d026f6fe7330cd68fcee89fc27f9
parent760f776a7ddeb43d69746282cc5b3f03a86d10d3 (diff)
Since the list of mpe(4) interfaces is only accessed in process context,
it does not need to be protected by splnet(). Rafael Zalamena agrees, no objection from the MPLS gang.
-rw-r--r--sys/net/if_mpe.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index 74039dcda59..d601111c899 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.35 2014/07/22 11:06:09 mpi Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.36 2014/10/07 08:59:50 mpi Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -84,7 +84,6 @@ mpe_clone_create(struct if_clone *ifc, int unit)
{
struct ifnet *ifp;
struct mpe_softc *mpeif;
- int s;
if ((mpeif = malloc(sizeof(*mpeif),
M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL)
@@ -110,9 +109,7 @@ mpe_clone_create(struct if_clone *ifc, int unit)
bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(u_int32_t));
#endif
- s = splnet();
LIST_INSERT_HEAD(&mpeif_list, mpeif, sc_list);
- splx(s);
return (0);
}
@@ -121,11 +118,8 @@ int
mpe_clone_destroy(struct ifnet *ifp)
{
struct mpe_softc *mpeif = ifp->if_softc;
- int s;
- s = splnet();
LIST_REMOVE(mpeif, sc_list);
- splx(s);
if_detach(ifp);
free(mpeif, M_DEVBUF, 0);