freebsd-skq/sys/net
Ryan Stone ab607f28e3 Don't read if_counters with if_addr_lock held
Calling into an ifnet implementation with the if_addr_lock already
held can cause a LOR and potentially a deadlock, as ifnet
implementations typically can take the if_addr_lock after their
own locks during configuration.  Refactor a sysctl handler that
was violating this to read if_counter data in a temporary buffer
before the if_addr_lock is taken, and then copying the data
in its final location later, when the if_addr_lock is held.

PR: 194109
Reported by: Jean-Sebastien Pedron
MFC after: 2 weeks
Differential Revision:	https://reviews.freebsd.org/D8498
Reviewed by: sbruno
2016-11-12 19:03:23 +00:00
..
altq Remove an alias if_list, use if_link consistently. 2016-10-06 00:51:27 +00:00
bpf_buffer.c
bpf_buffer.h
bpf_filter.c Implement BPF_MOD and BPF_XOR instructions. 2016-10-21 06:55:07 +00:00
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c
bpf_zerocopy.h
bpf.c Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
bpf.h
bpfdesc.h
bridgestp.c
bridgestp.h
ethernet.h net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1. 2016-09-01 06:32:35 +00:00
fddi.h
firewire.h
flowtable.c
flowtable.h
ieee8023ad_lacp.c
ieee8023ad_lacp.h
ieee_oui.h
if_arc.h
if_arcsubr.c Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
if_arp.h
if_atm.h
if_atmsubr.c
if_bridge.c Remove excess CTLFLAG_VNET 2016-10-26 23:40:07 +00:00
if_bridgevar.h
if_clone.c
if_clone.h
if_dead.c
if_debug.c
if_disc.c
if_dl.h
if_edsc.c
if_enc.c
if_enc.h
if_epair.c Teach netisr_get_cpuid() to limit a given value to supported by netisr. 2016-08-17 20:21:33 +00:00
if_ethersubr.c Extract out the various local definitions of ETHER_IS_BROADCAST() and 2016-08-07 03:48:33 +00:00
if_fddisubr.c Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
if_fwsubr.c
if_gif.c Extract out the various local definitions of ETHER_IS_BROADCAST() and 2016-08-07 03:48:33 +00:00
if_gif.h
if_gre.c
if_gre.h
if_iso88025subr.c Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
if_lagg.c
if_lagg.h
if_llatbl.c Make LLTABLE list lock private for if_llatbl.c 2016-10-11 17:41:13 +00:00
if_llatbl.h Make LLTABLE list lock private for if_llatbl.c 2016-10-11 17:41:13 +00:00
if_llc.h
if_loop.c Clear mbuf hashtype on loopback when RSS is enabled. 2016-10-20 13:48:29 +00:00
if_me.c
if_media.c
if_media.h
if_mib.c
if_mib.h
if_pflog.h
if_pfsync.h
if_sppp.h
if_spppfr.c
if_spppsubr.c
if_stf.c
if_tap.c
if_tap.h
if_tapvar.h
if_tun.c
if_tun.h
if_types.h
if_var.h Fix typo in comment. 2016-10-19 02:24:57 +00:00
if_vlan_var.h
if_vlan.c
if_vxlan.c
if_vxlan.h
if.c ifnet: Use if_link_state snapshot to invoke ifnet_link_event 2016-10-12 01:52:29 +00:00
if.h
ifdi_if.m Update iflib to support more NIC designs 2016-08-12 21:29:44 +00:00
iflib.c Set default capabilities at attach. 2016-10-18 14:02:45 +00:00
iflib.h Update iflib to support more NIC designs 2016-08-12 21:29:44 +00:00
ifq.h
iso88025.h
mp_ring.c
mp_ring.h
mppc.h
mppcc.c
mppcd.c
netisr_internal.h
netisr.c Teach netisr_get_cpuid() to limit a given value to supported by netisr. 2016-08-17 20:21:33 +00:00
netisr.h
netmap_user.h remove trailing whitespace. No code changes. 2016-10-18 15:41:57 +00:00
netmap_virt.h Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: 2016-10-27 09:46:22 +00:00
netmap.h Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: 2016-10-27 09:46:22 +00:00
paravirt.h
pfil.c
pfil.h
pfkeyv2.h
pfvar.h
ppp_defs.h
radix_mpath.c
radix_mpath.h
radix.c
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
rndis.h hyperv/hn: Define empty packet filter. 2016-10-27 04:55:19 +00:00
route_var.h Replace rw_init/rw_destroy with corresponding macros. 2016-10-06 14:42:06 +00:00
route.c Replace rw_init/rw_destroy with corresponding macros. 2016-10-06 14:42:06 +00:00
route.h rtentry: Initialize rt_mtx with MTX_NEW 2016-08-01 23:07:31 +00:00
rss_config.c
rss_config.h
rtsock.c Don't read if_counters with if_addr_lock held 2016-11-12 19:03:23 +00:00
sff8436.h
sff8472.h
slcompress.c
slcompress.h
toeplitz.c
toeplitz.h
vnet.c
vnet.h