From: bluhm Date: Sat, 25 Dec 2021 13:35:17 +0000 (+0000) Subject: For a long time ip_ours() and ip6_ours() are calling ip_deliver() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=98e6f338a8100cd1675dcf413751001fca3a3885;p=openbsd For a long time ip_ours() and ip6_ours() are calling ip_deliver() without kernel lock. Unlock the two callers in ip6_input_if() that have been forgotten. OK mvs@ kn@ --- diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 4ddc3e998da..142477d4fdf 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.237 2021/06/03 04:47:54 dlg Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.238 2021/12/25 13:35:17 bluhm Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -404,12 +404,9 @@ ip6_input_if(struct mbuf **mp, int *offp, int nxt, int af, struct ifnet *ifp) } if (ours) { - if (af == AF_UNSPEC) { - KERNEL_LOCK(); + if (af == AF_UNSPEC) nxt = ip_deliver(mp, offp, nxt, AF_INET6); - KERNEL_UNLOCK(); - } goto out; } goto bad; @@ -508,11 +505,8 @@ ip6_input_if(struct mbuf **mp, int *offp, int nxt, int af, struct ifnet *ifp) goto out; if (ours) { - if (af == AF_UNSPEC) { - KERNEL_LOCK(); + if (af == AF_UNSPEC) nxt = ip_deliver(mp, offp, nxt, AF_INET6); - KERNEL_UNLOCK(); - } goto out; }