Thread (23 messages) 23 messages, 4 authors, 2010-10-05

Re: [PATCH net-next V3] net: dynamic ingress_queue allocation

From: Eric Dumazet <hidden>
Date: 2010-10-04 12:52:07

Le lundi 04 octobre 2010 à 14:06 +0200, Jarek Poplawski a écrit :
Right, but then at least in qdisc_lookup():

if (dev_ingress_queue(dev))
	q = qdisc_match_from_root(dev_ingress_queue(dev), handle);

you should use a variable instead of the second dereference (rtnl isn't
mandatory here).
I am lost.

If rntl is not mandatory, what is the lock that protects us ?

qdisc_lookup() _is_ called under the protection of a lock.
Or as soon as we return from it, result could change under us.

Please name it, and I'll use it :

rcu_dereference_protected(dev->ingress_queue, lockdep_is_held(THISLOCK))


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