aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>2024-12-08 14:50:02 +0500
committerJakub Kicinski <kuba@kernel.org>2024-12-10 19:02:47 -0800
commit0c9547e6ccf40455b0574cf589be3b152a3edf5b (patch)
tree4176e47e1cd03d3ee3e7ab0c143d4df916aa61c7 /net/unix/af_unix.c
parent5cb099902b6b6292b3a85ffa1bb844e0ba195945 (diff)
downloadlinux-0c9547e6ccf40455b0574cf589be3b152a3edf5b.tar.gz
linux-0c9547e6ccf40455b0574cf589be3b152a3edf5b.tar.bz2
linux-0c9547e6ccf40455b0574cf589be3b152a3edf5b.zip
net: renesas: rswitch: fix race window between tx start and complete
If hardware is already transmitting, it can start handling the descriptor being written to immediately after it observes updated DT field, before the queue is kicked by a write to GWTRC. If the start_xmit() execution is preempted at unfortunate moment, this transmission can complete, and interrupt handled, before gq->cur gets updated. With the current implementation of completion, this will cause the last entry not completed. Fix that by changing completion loop to check DT values directly, instead of depending on gq->cur. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241208095004.69468-3-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions