path: root/net/sched/cls_api.c
diff options
authorVlad Buslov <vladbu@mellanox.com>2018-08-10 20:51:52 +0300
committerDavid S. Miller <davem@davemloft.net>2018-08-11 12:37:10 -0700
commit84a75b329be84c108a21ab9c02a52a9bf9e5a919 (patch)
tree54e1878072e38345ae860567911a2b218935bf63 /net/sched/cls_api.c
parentnet: sched: act_vlan: remove dependency on rtnl lock (diff)
net: sched: extend action ops with put_dev callback
As a preparation for removing dependency on rtnl lock from rules update path, all users of shared objects must take reference while working with them. Extend action ops with put_dev() API to be used on net device returned by get_dev(). Modify mirred action (only action that implements get_dev callback): - Take reference to net device in get_dev. - Implement put_dev API that releases reference to net device. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index f922ce27ed5e..31bd1439cf60 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -2176,6 +2176,7 @@ static int tc_exts_setup_cb_egdev_call(struct tcf_exts *exts,
if (!dev)
ret = tc_setup_cb_egdev_call(dev, type, type_data, err_stop);
+ a->ops->put_dev(dev);
if (ret < 0)
return ret;
ok_count += ret;