diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-01 20:52:33 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-01 20:52:33 +0000 |
commit | 4876174ab8aa7666c5d49ac7a9478699b2228f00 (patch) | |
tree | 62d4fa3315feca4b95d647f7d39306a13e0fdcf6 /sys/net/if_spppsubr.c | |
parent | 05f884ae28dd92c53217dcdb993df8001c972b46 (diff) |
Add missing splx().
I introduced this bug in 2015 but the splsoftnet()/splx() dance in the
upper layer masked it. Pseudo drivers generally don't need any splnet()
protection.
Found by Mark Patruck and Andrei-Marius Radu since the NET_LOCK() no longer
raise any IPL.
Strangely jsg@ confirmed that cppcheck nor coccinelle found the missing splx().
ok kettenis@, sthen@, deraadt@
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index b89d99e85cf..6b3602b7a13 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.165 2017/06/16 10:58:43 stsp Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.166 2017/08/01 20:52:32 mpi Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -665,6 +665,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m, rv = if_enqueue(ifp, m); if (rv != 0) { ifp->if_oerrors++; + splx(s); return (rv); } @@ -674,6 +675,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m, * according to RFC 1333. */ ifp->if_obytes += sp->pp_framebytes; + splx(s); return (0); } |