Thread (26 messages) 26 messages, 5 authors, 2014-05-15

Re: [RFC PATCH 01/15] net: qdisc: use rcu prefix and silence sparse warnings

From: John Fastabend <john.fastabend@gmail.com>
Date: 2014-05-01 15:20:38

On 04/30/2014 04:29 PM, Eric Dumazet wrote:
On Wed, 2014-04-30 at 15:25 -0700, John Fastabend wrote:
quoted
It looks like it except for qdisc_watchdog() which needs an
rcu_read_lock() if I'm not mistaken/

static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
{
	struct qdisc_watchdog *wd = container_of(timer, struct 		
						 qdisc_watchdog,
						 timer);

	rcu_read_lock();
	qdisc_unthrottled(wd->qdisc);
	__netif_schedule(qdisc_root(wd->qdisc));
	rcu_read_unlock();

	return HRTIMER_NORESTART;
}
Normally, HRTIMER handlers are run under softirq.
Right, so I'll change the qdisc_root() usage to rcu_dereference_rtnl().
Anyway you could simply use following on your builds

CONFIG_PROVE_RCU=y
I've been doing this although I haven't checked the output on this
series for a bit and I missed a few places that need to be wrapped
with rtnl_dereference() in the tcf_* code.

Thanks!

-- 
John Fastabend         Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help