diff options
| author | Eric Dumazet <edumazet@google.com> | 2024-05-03 19:20:54 +0000 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2024-05-07 11:14:50 +0200 |
| commit | ad13b5b0d1f9eb8e048394919e6393e520b14552 (patch) | |
| tree | 015b7013ba36f347ae850663d60e138853635254 /net/sched/sch_api.c | |
| parent | rtnetlink: do not depend on RTNL for IFLA_IFNAME output (diff) | |
| download | linux-ad13b5b0d1f9eb8e048394919e6393e520b14552.tar.gz linux-ad13b5b0d1f9eb8e048394919e6393e520b14552.zip | |
rtnetlink: do not depend on RTNL for IFLA_TXQLEN output
rtnl_fill_ifinfo() can read dev->tx_queue_len locklessly,
granted we add corresponding READ_ONCE()/WRITE_ONCE() annotations.
Add missing READ_ONCE(dev->tx_queue_len) in teql_enqueue()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched/sch_api.c')
| -rw-r--r-- | net/sched/sch_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 6292d6d73b72..74afc210527d 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1334,7 +1334,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev, * before again attaching a qdisc. */ if ((dev->priv_flags & IFF_NO_QUEUE) && (dev->tx_queue_len == 0)) { - dev->tx_queue_len = DEFAULT_TX_QUEUE_LEN; + WRITE_ONCE(dev->tx_queue_len, DEFAULT_TX_QUEUE_LEN); netdev_info(dev, "Caught tx_queue_len zero misconfig\n"); } |
