diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-02-11 11:55:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-12 21:41:33 +0300 |
commit | ec6743a10996d38e0438e5f45f2347ff2f42df0a (patch) | |
tree | d75c1ea33f894ba7ec79f4046cacdfb59759731e /net/sched/cls_bpf.c | |
parent | 726d061286ceeeabda54ba6f080d0cb8f187a9d7 (diff) | |
download | linux-ec6743a10996d38e0438e5f45f2347ff2f42df0a.tar.xz |
net: sched: track rtnl lock status when validating extensions
Actions API is already updated to not rely on rtnl lock for
synchronization. However, it need to be provided with rtnl status when
called from classifiers API in order to be able to correctly release the
lock when loading kernel module.
Extend extension validation function with 'rtnl_held' flag which is passed
to actions API. Add new 'rtnl_held' parameter to tcf_exts_validate() in cls
API. No classifier is currently updated to support unlocked execution, so
pass hardcoded 'true' flag parameter value.
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_bpf.c')
-rw-r--r-- | net/sched/cls_bpf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index a95cb240a606..656b3423ad35 100644 --- a/net/sched/cls_bpf.c +++ b/net/sched/cls_bpf.c @@ -417,7 +417,8 @@ static int cls_bpf_set_parms(struct net *net, struct tcf_proto *tp, if ((!is_bpf && !is_ebpf) || (is_bpf && is_ebpf)) return -EINVAL; - ret = tcf_exts_validate(net, tp, tb, est, &prog->exts, ovr, extack); + ret = tcf_exts_validate(net, tp, tb, est, &prog->exts, ovr, true, + extack); if (ret < 0) return ret; |