]> 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)
commitd1ecb3e4587b894e27dbb69a9d2016a24c4af57a
treecc2ffffdb0e10f09d7a03b2ac7f943d7d1d16ebe
parent4ef10132aea92a2921cfe9b8cc31415013bcbeb8
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