kernel_optimize_test/drivers/net/dsa
Richard Cochran 2290482379 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: c6fe0ad2c3 ("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>
2018-04-12 22:05:58 -04:00
..
b53 net: dsa: b53: Fix sparse warnings in b53_mmap.c 2018-04-04 11:15:27 -04:00
microchip dsa: Pass the port to get_sset_count() 2018-03-04 13:34:18 -05:00
mv88e6xxx net: dsa: mv88e6xxx: Fix receive time stamp race condition. 2018-04-12 22:05:58 -04:00
bcm_sf2_cfp.c
bcm_sf2_regs.h
bcm_sf2.c
bcm_sf2.h
dsa_loop_bdinfo.c
dsa_loop.c dsa: Pass the port to get_sset_count() 2018-03-04 13:34:18 -05:00
dsa_loop.h
Kconfig
lan9303_i2c.c
lan9303_mdio.c
lan9303-core.c dsa: Pass the port to get_sset_count() 2018-03-04 13:34:18 -05:00
lan9303.h
Makefile net: dsa: Fix functional dsa-loop dependency on FIXED_PHY 2018-03-22 13:02:47 -04:00
mt7530.c net: dsa: mt7530: Use NULL instead of plain integer 2018-04-04 11:15:49 -04:00
mt7530.h
mv88e6060.c
mv88e6060.h
qca8k.c dsa: Pass the port to get_sset_count() 2018-03-04 13:34:18 -05:00
qca8k.h