Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys apply if_start_lock() to L2 callers which call ifp->if_s...
details: https://anonhg.NetBSD.org/src/rev/d5de71ad8651
branches: trunk
changeset: 346044:d5de71ad8651
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Jun 20 08:30:58 2016 +0000
description:
apply if_start_lock() to L2 callers which call ifp->if_start() of device derivers
diffstat:
sys/altq/altq_cbq.c | 6 +++---
sys/altq/altq_subr.c | 6 +++---
sys/kern/kern_pmf.c | 6 +++---
sys/net/if.c | 6 +++---
sys/net/if_ecosubr.c | 6 +++---
sys/net/if_spppsubr.c | 12 ++++++------
sys/net80211/ieee80211_output.c | 10 +++++-----
sys/net80211/ieee80211_proto.c | 6 +++---
8 files changed, 29 insertions(+), 29 deletions(-)
diffs (261 lines):
diff -r b9fd256971e5 -r d5de71ad8651 sys/altq/altq_cbq.c
--- a/sys/altq/altq_cbq.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/altq/altq_cbq.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cbq.c,v 1.29 2016/04/20 08:58:48 knakahara Exp $ */
+/* $NetBSD: altq_cbq.c,v 1.30 2016/06/20 08:30:58 knakahara Exp $ */
/* $KAME: altq_cbq.c,v 1.21 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.29 2016/04/20 08:58:48 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.30 2016/06/20 08:30:58 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -592,7 +592,7 @@
ifp = ifq->altq_ifp;
if (ifp->if_start &&
cbqp->cbq_qlen > 0 && (ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
}
static void
diff -r b9fd256971e5 -r d5de71ad8651 sys/altq/altq_subr.c
--- a/sys/altq/altq_subr.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/altq/altq_subr.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_subr.c,v 1.31 2016/05/12 02:24:16 ozaki-r Exp $ */
+/* $NetBSD: altq_subr.c,v 1.32 2016/06/20 08:30:58 knakahara Exp $ */
/* $KAME: altq_subr.c,v 1.24 2005/04/13 03:44:25 suz Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_subr.c,v 1.31 2016/05/12 02:24:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_subr.c,v 1.32 2016/06/20 08:30:58 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -366,7 +366,7 @@
active++;
if (!IFQ_IS_EMPTY(&ifp->if_snd) && ifp->if_start != NULL) {
int _s = splnet();
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
splx(_s);
}
diff -r b9fd256971e5 -r d5de71ad8651 sys/kern/kern_pmf.c
--- a/sys/kern/kern_pmf.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/kern/kern_pmf.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.37 2015/02/13 13:26:50 maxv Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.38 2016/06/20 08:30:58 knakahara Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.37 2015/02/13 13:26:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.38 2016/06/20 08:30:58 knakahara Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -911,7 +911,7 @@
ifp->if_flags &= ~IFF_RUNNING;
if ((*ifp->if_init)(ifp) != 0)
aprint_normal_ifnet(ifp, "resume failed\n");
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
}
splx(s);
diff -r b9fd256971e5 -r d5de71ad8651 sys/net/if.c
--- a/sys/net/if.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/net/if.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.342 2016/06/20 06:41:30 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.343 2016/06/20 08:30:58 knakahara Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.342 2016/06/20 06:41:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.343 2016/06/20 08:30:58 knakahara Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -2787,7 +2787,7 @@
ifp->if_omcasts++;
if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
out:
splx(s);
diff -r b9fd256971e5 -r d5de71ad8651 sys/net/if_ecosubr.c
--- a/sys/net/if_ecosubr.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/net/if_ecosubr.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ecosubr.c,v 1.47 2016/06/20 06:46:37 knakahara Exp $ */
+/* $NetBSD: if_ecosubr.c,v 1.48 2016/06/20 08:30:58 knakahara Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.47 2016/06/20 06:46:37 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.48 2016/06/20 08:30:58 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -782,7 +782,7 @@
break;
}
ec->ec_state = ECO_IDLE;
- ifp->if_start(ifp);
+ if_start_lock(ifp);
}
/*
diff -r b9fd256971e5 -r d5de71ad8651 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/net/if_spppsubr.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_spppsubr.c,v 1.142 2016/06/10 13:27:16 ozaki-r Exp $ */
+/* $NetBSD: if_spppsubr.c,v 1.143 2016/06/20 08:30:59 knakahara Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.142 2016/06/10 13:27:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.143 2016/06/20 08:30:59 knakahara Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -832,7 +832,7 @@
* framing according to RFC 1333.
*/
if (!(ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
ifp->if_obytes += m->m_pkthdr.len + sp->pp_framebytes;
}
splx(s);
@@ -1214,7 +1214,7 @@
} else
IF_ENQUEUE(&sp->pp_cpq, m);
if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
ifp->if_obytes += m->m_pkthdr.len + sp->pp_framebytes;
}
@@ -1279,7 +1279,7 @@
} else
IF_ENQUEUE(&sp->pp_cpq, m);
if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
ifp->if_obytes += m->m_pkthdr.len + sp->pp_framebytes;
}
@@ -4715,7 +4715,7 @@
} else
IF_ENQUEUE(&sp->pp_cpq, m);
if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
ifp->if_obytes += m->m_pkthdr.len + 3;
}
diff -r b9fd256971e5 -r d5de71ad8651 sys/net80211/ieee80211_output.c
--- a/sys/net80211/ieee80211_output.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/net80211/ieee80211_output.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_output.c,v 1.54 2016/05/16 09:53:59 ozaki-r Exp $ */
+/* $NetBSD: ieee80211_output.c,v 1.55 2016/06/20 08:30:59 knakahara Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.34 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.54 2016/05/16 09:53:59 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.55 2016/06/20 08:30:59 knakahara Exp $");
#endif
#ifdef _KERNEL_OPT
@@ -221,7 +221,7 @@
ic->ic_mgt_timer = timer;
ifp->if_timer = 1;
}
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
return 0;
}
@@ -268,7 +268,7 @@
wh->i_fc[1] & IEEE80211_FC1_PWR_MGT ? "ena" : "dis");
IF_ENQUEUE(&ic->ic_mgtq, m); /* cheat */
- (*ifp->if_start)(ifp);
+ if_start_lock(ifp);
return 0;
}
@@ -1362,7 +1362,7 @@
ieee80211_chan2ieee(ic, ic->ic_curchan));
IF_ENQUEUE(&ic->ic_mgtq, m);
- (*ic->ic_ifp->if_start)(ic->ic_ifp);
+ if_start_lock(ic->ic_ifp);
return 0;
}
diff -r b9fd256971e5 -r d5de71ad8651 sys/net80211/ieee80211_proto.c
--- a/sys/net80211/ieee80211_proto.c Mon Jun 20 08:24:36 2016 +0000
+++ b/sys/net80211/ieee80211_proto.c Mon Jun 20 08:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_proto.c,v 1.31 2015/08/24 22:21:26 pooka Exp $ */
+/* $NetBSD: ieee80211_proto.c,v 1.32 2016/06/20 08:30:59 knakahara Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.23 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.31 2015/08/24 22:21:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.32 2016/06/20 08:30:59 knakahara Exp $");
#endif
/*
@@ -1121,7 +1121,7 @@
if (ic->ic_opmode == IEEE80211_M_STA)
ieee80211_notify_node_join(ic, ni,
arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP);
- (*ifp->if_start)(ifp); /* XXX not authorized yet */
+ if_start_lock(ifp); /* XXX not authorized yet */
break;
}
/*
Home |
Main Index |
Thread Index |
Old Index