NetBSD/sys/netinet
ozaki-r 8f4376cb6f Fix race condition on ifqueue used by traditional netisr
If a underlying network device driver supports MSI/MSI-X, RX interrupts
can be delivered to arbitrary CPUs. This means that Layer 2 subroutines
such as ether_input (softint) and subsequent Layer 3 subroutines (softint)
which are called via traditional netisr can be dispatched on an arbitrary
CPU. Layer 2 subroutines now run without any locks (expected) and so a
Layer 2 subroutine and a Layer 3 subroutine can run in parallel.

There is a shared data between a Layer 2 routine and a Layer 3 routine,
that is ifqueue and IF_ENQUEUE (from L2) and IF_DEQUEUE (from L3) on it
are racy now.

To fix the race condition, use ifqueue#ifq_lock to protect ifqueue
instead of splnet that is meaningless now.

The same race condition exists in route_intr. Fix it as well.

Reviewed by knakahara@
2016-10-03 11:06:06 +00:00
..
accept_filter.h
accf_data.c KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
accf_http.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
cpu_in_cksum.c
dccp_cc_sw.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
dccp_cc_sw.h
dccp_tcplike.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
dccp_tcplike.h KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dccp_tfrc_lookup.h
dccp_tfrc.c KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dccp_tfrc.h KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dccp_usrreq.c KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dccp_var.h KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dccp.h
files.ipfilter
files.netinet Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
icmp6.h
icmp_private.h
icmp_var.h
if_arp.c Fix race condition on ifqueue used by traditional netisr 2016-10-03 11:06:06 +00:00
if_atm.c Constify rtentry of if_output 2016-04-28 00:16:56 +00:00
if_atm.h Constify rtentry of if_output 2016-04-28 00:16:56 +00:00
if_ether.h
if_inarp.h Constify rtentry of arpresolve 2016-04-19 04:13:56 +00:00
igmp_var.h
igmp.c Apply pserialize and psref to struct ifaddr and its variants 2016-08-01 03:15:30 +00:00
igmp.h
in4_cksum.c
in_cksum.c
in_gif.c remove unnecessary dependency on gif.h to become friendly with module and rump. 2016-08-18 11:34:09 +00:00
in_gif.h fix: gif(4) receive side race 2016-07-04 04:22:47 +00:00
in_ifattach.h
in_offload.c Stop using rt_gwroute on packet sending paths 2016-04-26 09:30:01 +00:00
in_offload.h
in_pcb_hdr.h
in_pcb.c Now that we disallow sending or receiving from invalid addresses, 2016-09-29 12:19:47 +00:00
in_pcb.h Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
in_print.c
in_proto.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
in_proto.h Revert previous: ran cvs commit when I meant cvs diff. Sorry! 2016-01-21 15:41:29 +00:00
in_selsrc.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
in_selsrc.h Hook up lltable/llentry with the kernel (and rumpkernel) 2015-08-31 08:02:44 +00:00
in_systm.h
in_var.h in_ifscrub is no longer needed. 2016-09-29 15:18:18 +00:00
in.c Default netmask to /32 for INET on POINTOPOINT links if not specified. 2016-10-01 17:17:20 +00:00
in.h Apply pserialize and psref to struct ifaddr and its variants 2016-08-01 03:15:30 +00:00
ip6.h
ip_carp.c Apply pserialize and psref to struct ifaddr and its variants 2016-08-01 03:15:30 +00:00
ip_carp.h Constify rtentry of if_output 2016-04-28 00:16:56 +00:00
ip_ecn.c sprinkle _KERNEL_OPT 2015-08-24 22:21:26 +00:00
ip_ecn.h
ip_encap.c make gif(4) and ip_encap MP-ify 2016-07-04 04:40:13 +00:00
ip_encap.h make encap_lock_{enter,exit} interruptable. 2016-07-04 04:35:09 +00:00
ip_etherip.c Introduce m_set_rcvif and m_reset_rcvif 2016-06-10 13:27:10 +00:00
ip_etherip.h
ip_flow.c improve fast-forward performance when the number of flows exceeds IPFLOW_MAX. 2016-08-01 10:22:53 +00:00
ip_icmp.c Apply pserialize and psref to struct ifaddr and its variants 2016-08-01 03:15:30 +00:00
ip_icmp.h
ip_id.c
ip_input.c Disallow input to detached addresses because they are not yet valid. 2016-09-07 15:41:44 +00:00
ip_mroute.c Apply pserialize and psref to struct ifaddr and its variants 2016-08-01 03:15:30 +00:00
ip_mroute.h
ip_output.c Drop UDP packets as well as TCP without error when sending from detached or 2016-09-20 14:30:13 +00:00
ip_private.h
ip_reass.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
ip_var.h improve fast-forward performance when the number of flows exceeds IPFLOW_MAX. 2016-08-01 10:22:53 +00:00
ip.h
Makefile Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
pim_var.h
pim.h
portalgo.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
portalgo.h
raw_ip.c Now that we disallow sending or receiving from invalid addresses, 2016-09-29 12:19:47 +00:00
sctp_asconf.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
sctp_asconf.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_constants.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_crc32.c sprinkle const on sctp_crc_c[] 2016-08-12 19:08:54 +00:00
sctp_crc32.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_hashdriver.c Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_hashdriver.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_header.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_indata.c Fix build when IPSEC enabled. 2016-04-25 21:21:02 +00:00
sctp_indata.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_input.c Avoid storing a pointer of an interface in a mbuf 2016-06-10 13:31:43 +00:00
sctp_input.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_output.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
sctp_output.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_pcb.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
sctp_pcb.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_peeloff.c Fix build when IPSEC enabled. 2016-04-25 21:21:02 +00:00
sctp_peeloff.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_structs.h Fix build when IPSEC enabled. 2016-04-25 21:21:02 +00:00
sctp_timer.c Fix build when IPSEC enabled. 2016-04-25 21:21:02 +00:00
sctp_timer.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_uio.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp_usrreq.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
sctp_var.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctp.h Add core networking support for SCTP. 2015-10-13 21:28:34 +00:00
sctputil.c Switch the address list of intefaces to pslist(9) 2016-07-07 09:32:01 +00:00
sctputil.h Use const for arguments to sctp_is_same_scope(). 2016-05-22 23:04:27 +00:00
tcp_congctl.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
tcp_congctl.h
tcp_debug.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
tcp_debug.h
tcp_fsm.h
tcp_input.c Avoid storing a pointer of an interface in a mbuf 2016-06-10 13:31:43 +00:00
tcp_output.c Introduce m_set_rcvif and m_reset_rcvif 2016-06-10 13:27:10 +00:00
tcp_private.h
tcp_sack.c sprinkle _KERNEL_OPT 2015-08-24 22:21:26 +00:00
tcp_seq.h
tcp_subr.c Introduce m_set_rcvif and m_reset_rcvif 2016-06-10 13:27:10 +00:00
tcp_timer.c fix: unlock in reverse order 2016-07-25 00:10:38 +00:00
tcp_timer.h
tcp_usrreq.c Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
tcp_var.h
tcp_vtw.c PR kern/51371: avoid shifting negative values 2016-07-28 07:54:31 +00:00
tcp_vtw.h Sweep unnecessary route.h inclusions 2016-04-26 08:44:44 +00:00
tcp.h
tcpip.h
udp_private.h
udp_usrreq.c Avoid storing a pointer of an interface in a mbuf 2016-06-10 13:31:43 +00:00
udp_var.h Give proper prototype to udp_output. 2016-01-20 22:01:18 +00:00
udp.h