mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
net: sched: RCU cls_tcindex
Make cls_tcindex RCU safe. This patch addds a new RCU routine rcu_dereference_bh_rtnl() to check caller either holds the rcu read lock or RTNL. This is needed to handle the case where tcindex_lookup() is being called in both cases. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1109c00547
commit
331b72922c
2 changed files with 165 additions and 95 deletions
|
@ -46,6 +46,16 @@ static inline int lockdep_rtnl_is_held(void)
|
|||
#define rcu_dereference_rtnl(p) \
|
||||
rcu_dereference_check(p, lockdep_rtnl_is_held())
|
||||
|
||||
/**
|
||||
* rcu_dereference_bh_rtnl - rcu_dereference_bh with debug checking
|
||||
* @p: The pointer to read, prior to dereference
|
||||
*
|
||||
* Do an rcu_dereference_bh(p), but check caller either holds rcu_read_lock_bh()
|
||||
* or RTNL. Note : Please prefer rtnl_dereference() or rcu_dereference_bh()
|
||||
*/
|
||||
#define rcu_dereference_bh_rtnl(p) \
|
||||
rcu_dereference_bh_check(p, lockdep_rtnl_is_held())
|
||||
|
||||
/**
|
||||
* rtnl_dereference - fetch RCU pointer when updates are prevented by RTNL
|
||||
* @p: The pointer to read, prior to dereferencing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue