]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: sched: add helper function to take reference to Qdisc
authorVlad Buslov <vladbu@mellanox.com>
Fri, 10 Dec 2021 10:47:28 +0000 (10:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:18:04 +0000 (10:18 +0100)
commitda1d324088c40fa0a382224c466175fc5c704106
tree90a8060249d9df5e2c7d700d581ff8b285f16380
parentf602ed9f8574512e7ea1ab65c3db7ba71053bf27
net: sched: add helper function to take reference to Qdisc

[ Upstream commit 9d7e82cec35c027756ec97e274f878251f271181 ]

Implement function to take reference to Qdisc that relies on rcu read lock
instead of rtnl mutex. Function only takes reference to Qdisc if reference
counter isn't zero. Intended to be used by unlocked cls API.

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/net/sch_generic.h