Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...
details: https://anonhg.NetBSD.org/src/rev/13b7ca27721b
branches: netbsd-8
changeset: 434328:13b7ca27721b
user: martin <martin%NetBSD.org@localhost>
date: Mon Oct 02 13:33:41 2017 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #297):
sys/net/if_bridge.c: revision 1.135
Add curlwp_bind to bridge_input for psref
It can be called in a thread context via tap (tap_dev_write).
Fix PR kern/52587
diffstat:
sys/net/if_bridge.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (70 lines):
diff -r 3c74f45ba4d9 -r 13b7ca27721b sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Mon Oct 02 13:21:40 2017 +0000
+++ b/sys/net/if_bridge.c Mon Oct 02 13:33:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.134 2017/03/07 01:53:53 ozaki-r Exp $ */
+/* $NetBSD: if_bridge.c,v 1.134.6.1 2017/10/02 13:33:41 martin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134 2017/03/07 01:53:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134.6.1 2017/10/02 13:33:41 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -1792,6 +1792,7 @@
struct bridge_iflist *bif;
struct ether_header *eh;
struct psref psref;
+ int bound;
DECLARE_LOCK_VARIABLE;
KASSERT(!cpu_intr_p());
@@ -1804,8 +1805,10 @@
return;
}
+ bound = curlwp_bind();
bif = bridge_lookup_member_if(sc, ifp, &psref);
if (bif == NULL) {
+ curlwp_bindx(bound);
ACQUIRE_GLOBAL_LOCKS();
ether_input(ifp, m);
RELEASE_GLOBAL_LOCKS();
@@ -1857,6 +1860,7 @@
if (_bif != NULL) {
bridge_release_member(sc, bif, &psref);
+ curlwp_bindx(bound);
if (_ifp != NULL) {
m->m_flags &= ~M_PROMISC;
ACQUIRE_GLOBAL_LOCKS();
@@ -1873,6 +1877,7 @@
memcmp(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN) == 0) {
bstp_input(sc, bif, m);
bridge_release_member(sc, bif, &psref);
+ curlwp_bindx(bound);
return;
}
@@ -1882,6 +1887,7 @@
*/
if (bstp_state_before_learning(bif)) {
bridge_release_member(sc, bif, &psref);
+ curlwp_bindx(bound);
ACQUIRE_GLOBAL_LOCKS();
ether_input(ifp, m);
RELEASE_GLOBAL_LOCKS();
@@ -1891,6 +1897,8 @@
bridge_release_member(sc, bif, &psref);
bridge_forward(sc, m);
+
+ curlwp_bindx(bound);
}
/*
Home |
Main Index |
Thread Index |
Old Index