]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: prevent insertion of new classifiers during chain flush
authorVlad Buslov <vladbu@mellanox.com>
Mon, 11 Feb 2019 08:55:42 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:41:33 +0000 (13:41 -0500)
commitb488ed6b1feca20311146ab3c0812127fb0572e9
tree1bbd36ec6d6bf3e1a53c1de07c9c9ed4560eabd1
parent0ba3251ce796f134f37e33a24e025ebba69361a2
net: sched: prevent insertion of new classifiers during chain flush

Extend tcf_chain with 'flushing' flag. Use the flag to prevent insertion of
new classifier instances when chain flushing is in progress in order to
prevent resource leak when tcf_proto is created by unlocked users
concurrently.

Return EAGAIN error from tcf_chain_tp_insert_unique() to restart
tc_new_tfilter() and lookup the chain/proto again.

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/sch_generic.h
net/sched/cls_api.c