Module Name:    src
Committed By:   martin
Date:           Sat Jul 20 15:55:23 UTC 2024

Modified Files:
        src/sys/net [netbsd-9]: if_bridge.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #1858):

        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.164.4.1 -r1.164.4.2 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.164.4.1 src/sys/net/if_bridge.c:1.164.4.2
--- src/sys/net/if_bridge.c:1.164.4.1	Thu Feb 27 18:34:12 2020
+++ src/sys/net/if_bridge.c	Sat Jul 20 15:55:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.164.4.1 2020/02/27 18:34:12 martin Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.164.4.2 2024/07/20 15:55:23 martin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.164.4.1 2020/02/27 18:34:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.164.4.2 2024/07/20 15:55:23 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -1486,7 +1486,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
@@ -1600,6 +1600,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. */
@@ -1695,6 +1700,8 @@ next:
 
 		m = n;
 	} while (m != NULL);
+	curlwp_bindx(bound);
+
 	return 0;
 
 unicast_asis:

Reply via email to