]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: flower: handle concurrent mask insertion
authorVlad Buslov <vladbu@mellanox.com>
Thu, 21 Mar 2019 13:17:38 +0000 (15:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2019 21:32:17 +0000 (14:32 -0700)
commit0f26292f3f53315fac1252ecba1828e63a8275cd
treecc2ffffdb0e10f09d7a03b2ac7f943d7d1d16ebe
parentd21adcce498de5e73512701e5302d2d996b9782a
net: sched: flower: handle concurrent mask insertion

Without rtnl lock protection masks with same key can be inserted
concurrently. Insert temporary mask with reference count zero to masks
hashtable. This will cause any concurrent modifications to retry.

Wait for rcu grace period to complete after removing temporary mask from
masks hashtable to accommodate concurrent readers.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Suggested-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_flower.c