Module Name: src Committed By: martin Date: Sat Jul 20 15:54:10 UTC 2024
Modified Files: src/sys/net [netbsd-10]: if_bridge.c Log Message: Pull up following revision(s) (requested by rin in ticket #763): sys/net/if_bridge.c: revision 1.192 bridge: add missing curlwp_bind() for pppoe >From knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.189.4.1 src/sys/net/if_bridge.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_bridge.c diff -u src/sys/net/if_bridge.c:1.189 src/sys/net/if_bridge.c:1.189.4.1 --- src/sys/net/if_bridge.c:1.189 Fri Jul 29 07:58:18 2022 +++ src/sys/net/if_bridge.c Sat Jul 20 15:54:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.189 2022/07/29 07:58:18 skrll Exp $ */ +/* $NetBSD: if_bridge.c,v 1.189.4.1 2024/07/20 15:54:10 martin Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.189 2022/07/29 07:58:18 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.189.4.1 2024/07/20 15:54:10 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1548,7 +1548,7 @@ bridge_output(struct ifnet *ifp, struct struct ifnet *dst_if; struct bridge_softc *sc; struct mbuf *n; - int s; + int s, bound; /* * bridge_output() is called from ether_output(), furthermore @@ -1658,6 +1658,11 @@ bridge_output(struct ifnet *ifp, struct return 0; } + /* + * When we use pppoe over bridge, bridge_output() can be called + * in a lwp context by pppoe_timeout_wk(). + */ + bound = curlwp_bind(); do { /* XXX Should call bridge_broadcast, but there are locking * issues which need resolving first. */ @@ -1754,6 +1759,8 @@ next: m = n; } while (m != NULL); + curlwp_bindx(bound); + return 0; unicast_asis: