Index: sys/arch/amd64/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/amd64/conf/GENERIC.MP,v diff -u -p -u -p -r1.16 GENERIC.MP --- sys/arch/amd64/conf/GENERIC.MP 9 Feb 2021 14:06:19 -0000 1.16 +++ sys/arch/amd64/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -4,6 +4,6 @@ include "arch/amd64/conf/GENERIC" option MULTIPROCESSOR #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/arch/arm64/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/arm64/conf/GENERIC.MP,v diff -u -p -u -p -r1.5 GENERIC.MP --- sys/arch/arm64/conf/GENERIC.MP 1 Jul 2018 21:05:07 -0000 1.5 +++ sys/arch/arm64/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -4,6 +4,6 @@ include "arch/arm64/conf/GENERIC" option MULTIPROCESSOR #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/arch/i386/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/i386/conf/GENERIC.MP,v diff -u -p -u -p -r1.11 GENERIC.MP --- sys/arch/i386/conf/GENERIC.MP 3 Jun 2018 05:18:33 -0000 1.11 +++ sys/arch/i386/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -7,6 +7,6 @@ include "arch/i386/conf/GENERIC" option MULTIPROCESSOR # Multiple processor support #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/arch/macppc/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/macppc/conf/GENERIC.MP,v diff -u -p -u -p -r1.2 GENERIC.MP --- sys/arch/macppc/conf/GENERIC.MP 15 Apr 2020 08:09:33 -0000 1.2 +++ sys/arch/macppc/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -4,6 +4,6 @@ include "arch/macppc/conf/GENERIC" option MULTIPROCESSOR #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/arch/powerpc64/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/powerpc64/conf/GENERIC.MP,v diff -u -p -u -p -r1.1 GENERIC.MP --- sys/arch/powerpc64/conf/GENERIC.MP 21 Jul 2020 21:38:31 -0000 1.1 +++ sys/arch/powerpc64/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -4,6 +4,6 @@ include "arch/powerpc64/conf/GENERIC" option MULTIPROCESSOR #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/arch/riscv64/conf/GENERIC.MP =================================================================== RCS file: /mount/openbsd/cvs/src/sys/arch/riscv64/conf/GENERIC.MP,v diff -u -p -u -p -r1.1 GENERIC.MP --- sys/arch/riscv64/conf/GENERIC.MP 29 Jun 2021 21:27:52 -0000 1.1 +++ sys/arch/riscv64/conf/GENERIC.MP 5 Dec 2023 23:58:23 -0000 @@ -4,6 +4,6 @@ include "arch/riscv64/conf/GENERIC" option MULTIPROCESSOR #option MP_LOCKDEBUG -#option WITNESS +option WITNESS cpu* at mainbus? Index: sys/netinet/ip_mroute.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet/ip_mroute.c,v diff -u -p -u -p -r1.139 ip_mroute.c --- sys/netinet/ip_mroute.c 14 Jun 2023 14:30:08 -0000 1.139 +++ sys/netinet/ip_mroute.c 5 Dec 2023 23:58:17 -0000 @@ -1048,11 +1048,18 @@ del_mfc(struct socket *so, struct mbuf * } int -socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src) +socket_send(struct socket *so, struct mbuf *mm, struct sockaddr_in *src) { - if (s != NULL) { - if (sbappendaddr(s, &s->so_rcv, sintosa(src), mm, NULL) != 0) { - sorwakeup(s); + if (so != NULL) { + struct inpcb *inp = sotoinpcb(so); + int ret; + + mtx_enter(&inp->inp_mtx); + ret = sbappendaddr(so, &so->so_rcv, sintosa(src), mm, NULL); + mtx_leave(&inp->inp_mtx); + + if (ret != 0) { + sorwakeup(so); return (0); } } Index: sys/netinet6/ip6_mroute.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/netinet6/ip6_mroute.c,v diff -u -p -u -p -r1.137 ip6_mroute.c --- sys/netinet6/ip6_mroute.c 14 Jun 2023 14:30:08 -0000 1.137 +++ sys/netinet6/ip6_mroute.c 5 Dec 2023 23:58:17 -0000 @@ -853,11 +853,18 @@ del_m6fc(struct socket *so, struct mf6cc } int -socket6_send(struct socket *s, struct mbuf *mm, struct sockaddr_in6 *src) +socket6_send(struct socket *so, struct mbuf *mm, struct sockaddr_in6 *src) { - if (s) { - if (sbappendaddr(s, &s->so_rcv, sin6tosa(src), mm, NULL) != 0) { - sorwakeup(s); + if (so != NULL) { + struct inpcb *inp = sotoinpcb(so); + int ret; + + mtx_enter(&inp->inp_mtx); + ret = sbappendaddr(so, &so->so_rcv, sin6tosa(src), mm, NULL); + mtx_leave(&inp->inp_mtx); + + if (ret != 0) { + sorwakeup(so); return 0; } }