diff options
| author | Peiyang Wang <[email protected]> | 2024-05-07 13:42:22 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2024-05-09 08:47:32 +0000 |
| commit | 094c281228529d333458208fd02fcac3b139d93b (patch) | |
| tree | ad3beb75bacee2d3894289e90b2e32f54e22548b /tools/testing/selftests/bpf/progs/sendmsg_unix_prog.c | |
| parent | net: hns3: release PTP resources if pf initialization failed (diff) | |
| download | kernel-094c281228529d333458208fd02fcac3b139d93b.tar.gz kernel-094c281228529d333458208fd02fcac3b139d93b.zip | |
net: hns3: use appropriate barrier function after setting a bit value
There is a memory barrier in followed case. When set the port down,
hclgevf_set_timmer will set DOWN in state. Meanwhile, the service task has
different behaviour based on whether the state is DOWN. Thus, to make sure
service task see DOWN, use smp_mb__after_atomic after calling set_bit().
CPU0 CPU1
========================== ===================================
hclgevf_set_timer_task() hclgevf_periodic_service_task()
set_bit(DOWN,state) test_bit(DOWN,state)
pf also has this issue.
Fixes: ff200099d271 ("net: hns3: remove unnecessary work in hclgevf_main")
Fixes: 1c6dfe6fc6f7 ("net: hns3: remove mailbox and reset work in hclge_main")
Signed-off-by: Peiyang Wang <[email protected]>
Signed-off-by: Jijie Shao <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/sendmsg_unix_prog.c')
0 files changed, 0 insertions, 0 deletions
