pkt_sched: gen_kill_estimator() rcu fixes
gen_kill_estimator() API is incomplete or not well documented, since
caller should make sure an RCU grace period is respected before
freeing stats_lock.
This was partially addressed in commit 5d944c640b
(gen_estimator: deadlock fix), but same problem exist for all
gen_kill_estimator() users, if lock they use is not already RCU
protected.
A code review shows xt_RATEEST.c, act_api.c, act_police.c have this
problem. Other are ok because they use qdisc lock, already RCU
protected.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cbd6890c59
commit
c7de2cf053
@@ -20,6 +20,7 @@ struct tcf_common {
|
||||
struct gnet_stats_queue tcfc_qstats;
|
||||
struct gnet_stats_rate_est tcfc_rate_est;
|
||||
spinlock_t tcfc_lock;
|
||||
struct rcu_head tcfc_rcu;
|
||||
};
|
||||
#define tcf_next common.tcfc_next
|
||||
#define tcf_index common.tcfc_index
|
||||
@@ -32,6 +33,7 @@ struct tcf_common {
|
||||
#define tcf_qstats common.tcfc_qstats
|
||||
#define tcf_rate_est common.tcfc_rate_est
|
||||
#define tcf_lock common.tcfc_lock
|
||||
#define tcf_rcu common.tcfc_rcu
|
||||
|
||||
struct tcf_police {
|
||||
struct tcf_common common;
|
||||
|
Reference in New Issue
Block a user