NetBSD/sys/netnatm
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
..
Makefile
files.netnatm
natm.c Fix race condition on ifqueue used by traditional netisr 2016-10-03 11:06:06 +00:00
natm.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
natm_pcb.c Sweep unncessary radix.h inclusions 2016-04-11 08:56:16 +00:00
natm_proto.c Fix race condition on ifqueue used by traditional netisr 2016-10-03 11:06:06 +00:00