]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: sched: extend Qdisc with rcu
authorVlad Buslov <vladbu@mellanox.com>
Fri, 10 Dec 2021 10:47:27 +0000 (10:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:18:04 +0000 (10:18 +0100)
commitf602ed9f8574512e7ea1ab65c3db7ba71053bf27
treeed454e606d35f221b917385923d18a19d80d17f6
parent92833e8b5db6c209e9311ac8c6a44d3bf1856659
net: sched: extend Qdisc with rcu

[ Upstream commit 3a7d0d07a386716b459b00783b11a8211cefcc0f ]

Currently, Qdisc API functions assume that users have rtnl lock taken. To
implement rtnl unlocked classifiers update interface, Qdisc API must be
extended with functions that do not require rtnl lock.

Extend Qdisc structure with rcu. Implement special version of put function
qdisc_put_unlocked() that is called without rtnl lock taken. This function
only takes rtnl lock if Qdisc reference counter reached zero and is
intended to be used as optimization.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[Lee: Sent to Stable]
Link: https://syzkaller.appspot.com/bug?id=d7e411c5472dd5da33d8cc921ccadc747743a568
Reported-by: syzbot+5f229e48cccc804062c0@syzkaller.appspotmail.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/rtnetlink.h
include/net/pkt_sched.h
include/net/sch_generic.h
net/sched/sch_api.c
net/sched/sch_generic.c