[PL #3471] af_packet spin lock warning

Mark Huang via RT devel at planet-lab.org
Tue Feb 8 10:42:34 EST 2005


Email Recipients (see http://www.planet-lab.org/Support)
       Requestor: mef at cs.princeton.edu


==================================================

vnet needs to disable softirqs before calling dev_queue_xmit_nit(), the 
function that copies outbound packets to network taps. Network taps like 
af_packet.c:packet_rcv() are not designed to be re-entrant.

The race is probably between a deferred call to packet_rcv() by 
vnet_packet.c:packet_hook() via netif_rx(), and a direct call to 
packet_rcv() by vnet_packet.c:packet_hook() via dev_queue_xmit_nit(). 
Fix is to disable softirqs via local_bh_disable() before calling 
dev_queue_xmit_nit().

How To Reproduce:

1. /usr/sbin/tcpdump -i vnet >/dev/null
2. Generate a lot of traffic.

--Mark




More information about the Devel-community mailing list