diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2018-07-05 17:24:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-08 12:42:28 +0900 |
commit | 789871bb2a0381425b106d2a995bde1460d35a34 (patch) | |
tree | 8066507367f44cb9371f4255a2aeb9801d36276b /net/sched/cls_api.c | |
parent | 036bb44327f50273e85ee4a2c9b56eebce1c0838 (diff) | |
download | lwn-789871bb2a0381425b106d2a995bde1460d35a34.tar.gz lwn-789871bb2a0381425b106d2a995bde1460d35a34.zip |
net: sched: implement unlocked action init API
Add additional 'rtnl_held' argument to act API init functions. It is
required to implement actions that need to release rtnl lock before loading
kernel module and reacquire if afterwards.
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index bbf8dda96b0e..ebc2b9dd783f 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1632,7 +1632,7 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb, if (exts->police && tb[exts->police]) { act = tcf_action_init_1(net, tp, tb[exts->police], rate_tlv, "police", ovr, - TCA_ACT_BIND, extack); + TCA_ACT_BIND, true, extack); if (IS_ERR(act)) return PTR_ERR(act); @@ -1645,7 +1645,8 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb, err = tcf_action_init(net, tp, tb[exts->action], rate_tlv, NULL, ovr, TCA_ACT_BIND, - &actions, &attr_size, extack); + &actions, &attr_size, true, + extack); if (err) return err; list_for_each_entry(act, &actions, list) |