[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101004142415.GA2049@del.dom.local>
Date: Mon, 4 Oct 2010 16:24:15 +0200
From: Jarek Poplawski <jarkao2@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: hadi@...erus.ca, David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next V3] net: dynamic ingress_queue allocation
On Mon, Oct 04, 2010 at 02:52:00PM +0200, Eric Dumazet wrote:
> 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))
>
You are right! There is no other lock. (I forgot I removed
qdisc_list_lock already ;-)
Sorry,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists