]> git.ipfire.org Git - thirdparty/linux.git/commit
ppp: annotate concurrent dev->stats accesses
authorEric Dumazet <edumazet@google.com>
Wed, 15 Jul 2026 05:55:41 +0000 (05:55 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 22 Jul 2026 01:45:36 +0000 (18:45 -0700)
commitba712ecfd942b68b21a4b0a5daaf72f6616cc66d
tree1851a659efeb1748a6c25474b52e76944876e0e1
parent0ab78ead2481adb52f9eb5b403865c529f6f2348
ppp: annotate concurrent dev->stats accesses

dev->stats fields can be updated concurrently from multiple CPUs
without synchronization.

Use DEV_STATS_INC() for stats increments and DEV_STATS_READ()
when reading dev->stats in ppp_get_stats64() and ppp_get_stats()
to avoid data races.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Qingfang Deng <qingfang.deng@linux.dev>
Link: https://patch.msgid.link/20260715055541.1147542-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ppp/ppp_generic.c