From: Cong Wang Date: Fri, 27 Oct 2017 01:24:40 +0000 (-0700) Subject: net_sched: add rtnl assertion to tcf_exts_destroy() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d132eba1d972ea6c0e47286e4c821b4a3c5b84d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net_sched: add rtnl assertion to tcf_exts_destroy() After previous patches, it is now safe to claim that tcf_exts_destroy() is always called with RTNL lock. Cc: Daniel Borkmann Cc: Jiri Pirko Cc: John Fastabend Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 045d13679ad6..231181c602ed 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -909,6 +909,7 @@ void tcf_exts_destroy(struct tcf_exts *exts) #ifdef CONFIG_NET_CLS_ACT LIST_HEAD(actions); + ASSERT_RTNL(); tcf_exts_to_list(exts, &actions); tcf_action_destroy(&actions, TCA_ACT_UNBIND); kfree(exts->actions);