]> www.infradead.org Git - users/willy/linux.git/commit
bpf, net: Use DEV_STAT_INC()
authoryunshui <jiangyunshui@kylinos.cn>
Thu, 23 May 2024 03:35:20 +0000 (11:35 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 May 2024 10:04:11 +0000 (12:04 +0200)
commitd9cbd8343b010016fcaabc361c37720dcafddcbe
treebca0593a4757df7d7d20410e46e08b3855d39faa
parente245ef8a0b06fa5a18ca3bdcf82430166419283e
bpf, net: Use DEV_STAT_INC()

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
net/core/filter.c