]> git.ipfire.org Git - thirdparty/linux.git/commit
net: team: Annotate reads and writes for mixed lock accessed values
authorMarc Harvey <marcharvey@google.com>
Thu, 9 Apr 2026 02:59:23 +0000 (02:59 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Mon, 13 Apr 2026 13:09:48 +0000 (15:09 +0200)
commit3faf0ce6e499dfd32e596bcb5bca2c44d64f4cc1
treec307d88647fc5ac55a93098ced591d19ba090013
parent8806d502e0a7e7d895b74afbd24e8550a65a2b17
net: team: Annotate reads and writes for mixed lock accessed values

The team_port's "index" and the team's "en_port_count" are read in
the hot transmit path, but are only written to when holding the rtnl
lock.

Use READ_ONCE() for all lockless reads of these values, and use
WRITE_ONCE() for all writes.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Marc Harvey <marcharvey@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260409-teaming-driver-internal-v7-1-f47e7589685d@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/team/team_core.c
drivers/net/team/team_mode_random.c
include/linux/if_team.h