From: Roland Dreier <rdreier@cisco.com>
To: David Miller <davem@davemloft.net>
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:51 -0700 [thread overview]
Message-ID: <adahd2ynank.fsf@cisco.com> (raw)
In-Reply-To: <adalksanb0c.fsf@cisco.com> (Roland Dreier's message of "Mon, 05 Jun 2006 21:50:11 -0700")
Roland> You know, looking at the ipoib code, I can't even recreate
Roland> why xmit_lock is taken in the set_multicast_list method
Roland> anyway, or how it works at all -- it seems
Roland> set_multicast_list will always be called with xmit_lock
Roland> already held. What the heck is going on?
Never mind -- I see that the set_multicast_list work needs to be
deferred to process context, so ipoib_mcast_restart_task() doesn't run
directly from the call to set_multicast_list.
I guess the fix in the current kernel is just something like the
below. And in the netif_tx_lock() patch, the local_irq_save() /
local_irq_restore() calls can just be removed.
Am I on the right track?
Anyway I won't push the patch below since the bug is harmless right
now and it can be fixed up as part of the netif_tx_lock() patch.
Thanks,
Roland
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index ec41c8f..5f3eaf1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -814,13 +814,12 @@ void ipoib_mcast_restart_task(void *dev_
struct dev_mc_list *mclist;
struct ipoib_mcast *mcast, *tmcast;
LIST_HEAD(remove_list);
- unsigned long flags;
ipoib_dbg_mcast(priv, "restarting multicast task\n");
ipoib_mcast_stop_thread(dev, 0);
- spin_lock_irqsave(&dev->xmit_lock, flags);
+ spin_lock_bh(&dev->xmit_lock);
spin_lock(&priv->lock);
/*
@@ -895,7 +894,7 @@ void ipoib_mcast_restart_task(void *dev_
}
spin_unlock(&priv->lock);
- spin_unlock_irqrestore(&dev->xmit_lock, flags);
+ spin_unlock_bh(&dev->xmit_lock);
/* We have to cancel outside of the spinlock */
list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
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 [this message]
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
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=adahd2ynank.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=mchan@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.