From: David Miller <davem@davemloft.net>
To: rdreier@cisco.com
Cc: herbert@gondor.apana.org.au, mchan@broadcom.com,
jgarzik@pobox.com, netdev@vger.kernel.org
Subject: Re: [NET]: Add netif_tx_lock
Date: Mon, 05 Jun 2006 21:57:48 -0700 (PDT) [thread overview]
Message-ID: <20060605.215748.28787254.davem@davemloft.net> (raw)
In-Reply-To: <adapshmnbam.fsf@cisco.com>
From: Roland Dreier <rdreier@cisco.com>
Date: Mon, 05 Jun 2006 21:44:01 -0700
> > IPOIB is going to BUG() with this change. Because now, in their
> > multicast code, you're going to local_bh_disable() via
> > netif_tx_unlock() with hw IRQs disabled which is illegal.
> >
> > It shows a bug here in the locking of the IPOIB driver.
>
> Sorry, I haven't followed this thread closely. Can you expand on what
> the bug in ipoib's multicast locking is?
It disables hw interrupts, and takes the xmit_lock.
xmit_lock is a BH only spinlock, you can't take it from hw
interrupts, or inside of a HW irq protected spinlock.
You can take it on the outside of a HW irq lock protected
area like this:
spin_lock_bh(&dev->xmit_lock);
spin_lock_irq(&whatever_lock);
spin_unlock_irq(&whatever_lock);
spin_unlock_bh(&dev->xmit_lock);
but not the other way around.
next prev parent reply other threads:[~2006-06-06 4:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 4:51 netif_tx_disable and lockless TX Michael Chan
2006-05-31 4:58 ` Herbert Xu
2006-05-31 5:11 ` David Miller
2006-05-31 5:14 ` Herbert Xu
2006-05-31 6:26 ` David Miller
2006-05-31 6:31 ` Herbert Xu
2006-05-31 7:08 ` David Miller
2006-05-31 12:06 ` Herbert Xu
2006-05-31 12:36 ` jamal
2006-05-31 12:40 ` Herbert Xu
2006-05-31 13:03 ` jamal
2006-05-31 17:52 ` Robert Olsson
2006-06-02 3:25 ` Stephen Hemminger
2006-06-02 10:46 ` Robert Olsson
2006-06-14 12:52 ` jamal
2006-05-31 21:20 ` Michael Chan
2006-06-01 0:09 ` David Miller
2006-06-01 0:25 ` Herbert Xu
2006-05-31 23:01 ` Michael Chan
2006-06-01 0:42 ` Herbert Xu
2006-06-01 0:27 ` Michael Chan
2006-06-01 2:27 ` Herbert Xu
2006-06-01 11:15 ` [NET]: Add netif_tx_lock Herbert Xu
2006-06-06 4:32 ` David Miller
2006-06-06 4:44 ` Roland Dreier
2006-06-06 4:50 ` Roland Dreier
2006-06-06 4:57 ` Roland Dreier
2006-06-06 5:10 ` David Miller
2006-06-06 6:01 ` Roland Dreier
2006-06-06 4:58 ` David Miller
2006-06-06 5:04 ` Roland Dreier
2006-06-06 5:09 ` David Miller
2006-06-06 4:57 ` David Miller [this message]
2006-06-06 10:22 ` Herbert Xu
2006-06-09 5:48 ` Herbert Xu
2006-06-09 19:21 ` David Miller
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=20060605.215748.28787254.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=rdreier@cisco.com \
/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;
as well as URLs for NNTP newsgroup(s).