summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2018-04-09 00:03:14 -0700
committerDavid S. Miller <davem@davemloft.net>2018-04-12 22:05:58 -0400
commit2290482379278e0254e6edfdb681d88359143fd1 (patch)
treec5bf8d47369ed3f8388ece5d315a072ae66e6e64 /drivers/net/virtio_net.c
parent53b76cdf7e8fecec1d09e38aad2f8579882591a8 (diff)
net: dsa: mv88e6xxx: Fix receive time stamp race condition.
The DSA stack passes received PTP frames to this driver via mv88e6xxx_port_rxtstamp() for deferred delivery. The driver then queues the frame and kicks the worker thread. The work callback reads out the latched receive time stamp and then works through the queue, delivering any non-matching frames without a time stamp. If a new frame arrives after the worker thread has read out the time stamp register but enters the queue before the worker finishes processing the queue, that frame will be delivered without a time stamp. This patch fixes the race by moving the queue onto a list on the stack before reading out the latched time stamp value. Fixes: c6fe0ad2c3499 ("net: dsa: mv88e6xxx: add rx/tx timestamping support") Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
0 files changed, 0 insertions, 0 deletions