net_sched: sch_hfsc: implement lockless accesses to q->defcls
authorEric Dumazet <edumazet@google.com>
Thu, 18 Apr 2024 07:32:45 +0000 (07:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2024 10:34:08 +0000 (11:34 +0100)
commit49e8ae53700212fbb26302df219922752e81fbd2
tree1f7638a2d70e8686d9a0201ae0dda1ead64342af
parent13a9965de32457d59aa3162d657aa4c5e512c146
net_sched: sch_hfsc: implement lockless accesses to q->defcls

Instead of relying on RTNL, hfsc_dump_qdisc() can use READ_ONCE()
annotation, paired with WRITE_ONCE() one in hfsc_change_qdisc().

Use READ_ONCE(q->defcls) in hfsc_classify() to
no longer acquire qdisc lock from hfsc_change_qdisc().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_hfsc.c