bpf, net: Use DEV_STAT_INC()
[ Upstream commit d9cbd834 ] syzbot/KCSAN reported that races happen when multiple CPUs updating dev->stats.tx_error concurrently. Adopt SMP safe DEV_STATS_INC() to update the dev->stats fields. Reported-by:syzbot <syzkaller@googlegroups.com> Signed-off-by:
yunshui <jiangyunshui@kylinos.cn> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240523033520.4029314-1-jiangyunshui@kylinos.cn Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please register or sign in to comment