Module Name: src Committed By: ozaki-r Date: Tue Jul 16 03:32:43 UTC 2024
Modified Files: src/sys/net: if_bridge.c Log Message: bridge: add missing curlwp_bind() for pppoe >From knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 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.191 src/sys/net/if_bridge.c:1.192 --- src/sys/net/if_bridge.c:1.191 Fri Jul 5 04:31:53 2024 +++ src/sys/net/if_bridge.c Tue Jul 16 03:32:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.191 2024/07/05 04:31:53 rin Exp $ */ +/* $NetBSD: if_bridge.c,v 1.192 2024/07/16 03:32:43 ozaki-r Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.191 2024/07/05 04:31:53 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.192 2024/07/16 03:32:43 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1547,7 +1547,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 @@ -1657,6 +1657,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. */ @@ -1753,6 +1758,8 @@ next: m = n; } while (m != NULL); + curlwp_bindx(bound); + return 0; unicast_asis: