From: Stephen Hemminger <stephen@networkplumber.org>
To: David Miller <davem@davemloft.net>, Joe Perches <joe@perches.com>
Cc: netdev@vger.kernel.org
Subject: [BUG] missing rcu_derefernce of txq->qdisc
Date: Sat, 31 Aug 2013 10:23:54 -0700 [thread overview]
Message-ID: <20130831102354.3ff9cc53@nehalam.linuxnetplumber.net> (raw)
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.
reply other threads:[~2013-08-31 17:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130831102354.3ff9cc53@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox