]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: traverse classifiers in chain with tcf_get_next_proto()
authorVlad Buslov <vladbu@mellanox.com>
Mon, 11 Feb 2019 08:55:40 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:41:33 +0000 (13:41 -0500)
commiteafa738b6cedaf12674d0f718d30ad13cf850417
tree5bcb097d9029d658b8a500bdb534eea13924edc9
parentea7e80b7c38a36d330cd2b1d798f64d6c10140f9
net: sched: traverse classifiers in chain with tcf_get_next_proto()

All users of chain->filters_chain rely on rtnl lock and assume that no new
classifier instances are added when traversing the list. Use
tcf_get_next_proto() to traverse filters list without relying on rtnl
mutex. This function iterates over classifiers by taking reference to
current iterator classifier only and doesn't assume external
synchronization of filters list.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h
net/sched/cls_api.c
net/sched/sch_api.c