Commit 5fbe395
idpf: Fix data race in idpf_net_dim
In idpf_net_dim(), some statistics protected by u64_stats_sync, are read
and accumulated in ignorance of possible u64_stats_fetch_retry() events.
The correct way to copy statistics is already illustrated by
idpf_add_queue_stats(). Fix this by reading them into temporary variables
first.
Fixes: c2d548c ("idpf: add TX splitq napi poll support")
Fixes: 3a8845a ("idpf: add RX splitq napi poll support")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260119162720.1463859-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 748a81c commit 5fbe395
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3941 | 3941 | | |
3942 | 3942 | | |
3943 | 3943 | | |
3944 | | - | |
| 3944 | + | |
3945 | 3945 | | |
3946 | 3946 | | |
3947 | 3947 | | |
| |||
3953 | 3953 | | |
3954 | 3954 | | |
3955 | 3955 | | |
3956 | | - | |
3957 | | - | |
| 3956 | + | |
| 3957 | + | |
3958 | 3958 | | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
3959 | 3962 | | |
3960 | 3963 | | |
3961 | 3964 | | |
| |||
3972 | 3975 | | |
3973 | 3976 | | |
3974 | 3977 | | |
3975 | | - | |
3976 | | - | |
| 3978 | + | |
| 3979 | + | |
3977 | 3980 | | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
3978 | 3984 | | |
3979 | 3985 | | |
3980 | 3986 | | |
| |||
0 commit comments