]> git.hungrycats.org Git - linux/commit
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
authorYunshui Jiang <jiangyunshui@kylinos.cn>
Fri, 31 May 2024 08:07:39 +0000 (16:07 +0800)
committerStefan Schmidt <stefan@datenfreihafen.org>
Mon, 3 Jun 2024 09:20:56 +0000 (11:20 +0200)
commitb8ec0dc3845f6c9089573cb5c2c4b05f7fc10728
treea55d585a1f5fa8e853b21987227fc645923e7fea
parent07aa33988ad92fef79056f5ec30b9a0e4364b616
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()

mac802154 devices update their dev->stats fields locklessly. Therefore
these counters should be updated atomically. Adopt SMP safe DEV_STATS_INC()
and DEV_STATS_ADD() to achieve this.

Signed-off-by: Yunshui Jiang <jiangyunshui@kylinos.cn>
Message-ID: <20240531080739.2608969-1-jiangyunshui@kylinos.cn>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/mac802154/tx.c