[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20130831102354.3ff9cc53@nehalam.linuxnetplumber.net>
Date: Sat, 31 Aug 2013 10:23:54 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: David Miller <davem@...emloft.net>, Joe Perches <joe@...ches.com>
Cc: netdev@...r.kernel.org
Subject: [BUG] missing rcu_derefernce of txq->qdisc
Way back in 2008, this commit added rcu_assign_pointer for the dev_queue->qdisc.
But we aren't using rcu_dereference to fetch the pointer, here and a couple
of other places. This is probably harmless, but could cause issues when compiler
decides to optimizations because of missing barrier.
static inline void netif_schedule_queue(struct netdev_queue *txq)
{
if (!(txq->state & QUEUE_STATE_ANY_XOFF))
__netif_schedule(txq->qdisc);
}
Adding the needed rcu_dereference creates other problems because the the
struct Qdisc needs to be fully known, net/sch_generic.h has to be included
from netdevice.h which creates other build problems.
A good way to see all the fallout is to put needed __rcu annotation
on netdev_tx_queue qdisc and use sparse.
I don't have time or patience to deal with it right now, maybe someone
else could have a go at it.
--
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