net: sched: avoid writing on noop_qdisc
authorEric Dumazet <edumazet@google.com>
Tue, 9 Oct 2018 22:20:50 +0000 (15:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:21:02 +0000 (08:21 +0100)
commite6c540bf97860b1256ea623f4257743ea22268df
treebb2e401f3d30b86e8ebb8c21a81f13c70042380b
parentb80939a47413c08e1756e437c435e57ffe4b87d9
net: sched: avoid writing on noop_qdisc

[ Upstream commit f98ebd47fd0da1717267ce1583a105d8cc29a16a ]

While noop_qdisc.gso_skb and noop_qdisc.skb_bad_txq are not used
in other places, it seems not correct to overwrite their fields
in dev_init_scheduler_queue().

noop_qdisc is essentially a shared and read-only object, even if
it is not marked as const because of some implementation detail.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_generic.c