[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47E819D2.9040805@chelsio.com>
Date: Mon, 24 Mar 2008 14:14:58 -0700
From: Divy Le Ray <divy@...lsio.com>
To: Roland Dreier <rdreier@...co.com>
CC: Jeff Garzik <jeff@...zik.org>, netdev@...r.kernel.org,
Steve Wise <swise@...ngridcomputing.com>,
Dimitris Michailidis <dm@...lsio.com>,
Felix Marti <felix@...lsio.com>
Subject: Re: cxgb3: Fix lockdep problems with sge.reg_lock
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@...co.com>
>
Acked-by: Divy Le Ray <divy@...lsio.com>
As you mention, the current code is correct even if lockdep disagrees.
Cheers,
Divy
--
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