From: Jeff Garzik <jeff@garzik.org>
To: Roland Dreier <rdreier@cisco.com>
Cc: netdev@vger.kernel.org, Divy Le Ray <divy@chelsio.com>,
Steve Wise <swise@opengridcomputing.com>,
Dimitris Michailidis <dm@chelsio.com>,
Felix Marti <felix@chelsio.com>
Subject: Re: cxgb3: Fix lockdep problems with sge.reg_lock
Date: Tue, 25 Mar 2008 23:20:25 -0400 [thread overview]
Message-ID: <47E9C0F9.9020708@garzik.org> (raw)
In-Reply-To: <adabq59xhmv.fsf@cisco.com>
Roland Dreier wrote:
> Using iWARP with a Chelsio T3 NIC generates the following lockdep warning:
>
> =================================
> [ INFO: inconsistent lock state ]
> 2.6.25-rc6 #50
> ---------------------------------
> inconsistent {softirq-on-W} -> {in-softirq-W} usage.
> swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
> (&adap->sge.reg_lock){-+..}, at: [<ffffffff880e5ee2>] cxgb_offload_ctl+0x3af/0x507 [cxgb3]
>
> The problem is that reg_lock is used with plain spin_lock() in
> drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in
> drivers/net/cxgb3/cxgb3_offload.c. This is technically a false
> positive, since the uses in sge.c are only in the initialization and
> cleanup paths and cannot overlap with any use in interrupt context.
>
> The best fix is probably just to use spin_lock_irq() with reg_lock in
> sge.c. Even though it's not strictly required for correctness, it
> avoids triggering lockdep and the extra overhead of disabling
> interrupts is not important at all in the initialization and cleanup
> slow paths.
>
> Signed-off-by: Roland Dreier <rolandd@cisco.com>
applied
prev parent reply other threads:[~2008-03-26 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 20:30 cxgb3: Fix lockdep problems with sge.reg_lock Roland Dreier
2008-03-24 21:14 ` Divy Le Ray
2008-03-26 3:20 ` Jeff Garzik [this message]
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=47E9C0F9.9020708@garzik.org \
--to=jeff@garzik.org \
--cc=divy@chelsio.com \
--cc=dm@chelsio.com \
--cc=felix@chelsio.com \
--cc=netdev@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=swise@opengridcomputing.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).