aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2021-02-22 10:14:24 -0700
committerAlex Williamson <alex.williamson@redhat.com>2021-02-22 10:14:24 -0700
commit72d6e4871f0457dc9e498f8437ea344ee6b78075 (patch)
tree44a6975d7f0818086e34b8e84e3164527fac36f4 /net/sched/cls_api.c
parentvfio/pci: remove CONFIG_VFIO_PCI_ZDEV from Kconfig (diff)
parentMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (diff)
downloadwireguard-linux-72d6e4871f0457dc9e498f8437ea344ee6b78075.tar.xz
wireguard-linux-72d6e4871f0457dc9e498f8437ea344ee6b78075.zip
Merge commit '3e10585335b7967326ca7b4118cada0d2d00a2ab' into v5.12/vfio/next
Update to new follow_pte() definition
Diffstat (limited to '')
-rw-r--r--net/sched/cls_api.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 37b77bd30974..e37556cc37ab 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3043,16 +3043,24 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb,
size_t attr_size = 0;
if (exts->police && tb[exts->police]) {
+ struct tc_action_ops *a_o;
+
+ a_o = tc_action_load_ops("police", tb[exts->police], rtnl_held, extack);
+ if (IS_ERR(a_o))
+ return PTR_ERR(a_o);
act = tcf_action_init_1(net, tp, tb[exts->police],
rate_tlv, "police", ovr,
- TCA_ACT_BIND, rtnl_held,
+ TCA_ACT_BIND, a_o, rtnl_held,
extack);
- if (IS_ERR(act))
+ if (IS_ERR(act)) {
+ module_put(a_o->owner);
return PTR_ERR(act);
+ }
act->type = exts->type = TCA_OLD_COMPAT;
exts->actions[0] = act;
exts->nr_actions = 1;
+ tcf_idr_insert_many(exts->actions);
} else if (exts->action && tb[exts->action]) {
int err;