]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: write once on dev->allmulti and dev->promiscuity
authorEric Dumazet <edumazet@google.com>
Fri, 3 May 2024 19:20:55 +0000 (19:20 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 7 May 2024 09:14:50 +0000 (11:14 +0200)
commit55a2c86c8db3d7aa2c1967efd37ed47d5ae37f43
treeb14aeedf2fef869a5bf90c85ba3888ec69d133b1
parentad13b5b0d1f9eb8e048394919e6393e520b14552
net: write once on dev->allmulti and dev->promiscuity

In the following patch we want to read dev->allmulti
and dev->promiscuity locklessly from rtnl_fill_ifinfo()

In this patch I change __dev_set_promiscuity() and
__dev_set_allmulti() to write these fields (and dev->flags)
only if they succeed, with WRITE_ONCE() annotations.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/dev.c