]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
macsec: use DEV_STATS_INC()
authorEric Dumazet <edumazet@google.com>
Fri, 4 Aug 2023 17:26:52 +0000 (17:26 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 30 Oct 2023 11:00:04 +0000 (12:00 +0100)
commit1ff27a15cb6ccecc5a6e20574eab526be53d33a8
tree16e42a87801127addb5a751e3d2674b9840d4c45
parent58a4be12ae60bea2c6fd4e60733a7e6f1db8d23e
macsec: use DEV_STATS_INC()

BugLink: https://bugs.launchpad.net/bugs/2038969
commit 32d0a49d36a2a306c2e47fe5659361e424f0ed3f upstream.

syzbot/KCSAN reported data-races in macsec whenever dev->stats fields
are updated.

It appears all of these updates can happen from multiple cpus.

Adopt SMP safe DEV_STATS_INC() to update dev->stats fields.

Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/macsec.c