* BUG: double spinlock in "drivers/net/3c505.c"
@ 2010-06-07 11:17 Alexander Strakh
2010-06-08 13:26 ` Christoph Fritz
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Strakh @ 2010-06-07 11:17 UTC (permalink / raw)
To: Philip Blundell
Cc: Craig Southeren, Andrew Tridgell, Alan Cox, netdev, linux-kernel
KERNEL_VERSION: 2.6.35-rc1
SUBJECT: duble spinlock in function elp_start_xmit
SUBSCRIBE:
In driver drivers/net/3c505.c in function elp_start_xmit:
1. In line 1075 we have first spinlock. In the next line we called
check_3c505_dma:
1070 static netdev_tx_t elp_start_xmit(struct sk_buff *skb, struct net_device
*dev)
1071 {
1072 unsigned long flags;
1073 elp_device *adapter = netdev_priv(dev);
1074
1075 spin_lock_irqsave(&adapter->lock, flags);
1076 check_3c505_dma(dev);
2. In function check_3c505_dma we have second spinloock at line 301.
293 static inline void check_3c505_dma(struct net_device *dev)
294 {
295 elp_device *adapter = netdev_priv(dev);
296 if (adapter->dmaing && time_after(jiffies, adapter-
>current_dma.start_time + 10)) {
297 unsigned long flags, f;
298 pr_err("%s: DMA %s timed out, %d bytes left\n", dev-
>name,
299 adapter->current_dma.direction ? "download" :
"upload",
300 get_dma_residue(dev->dma));
301 spin_lock_irqsave(&adapter->lock, flags);
Found by Linux Device Drivers Verification Project (Svace Detector)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: double spinlock in "drivers/net/3c505.c"
2010-06-07 11:17 BUG: double spinlock in "drivers/net/3c505.c" Alexander Strakh
@ 2010-06-08 13:26 ` Christoph Fritz
2010-06-18 3:12 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Fritz @ 2010-06-08 13:26 UTC (permalink / raw)
To: Alexander Strakh
Cc: Philip Blundell, Craig Southeren, Andrew Tridgell, Alan Cox,
netdev, linux-kernel
On Mon, 2010-06-07 at 15:17 +0400, Alexander Strakh wrote:
> KERNEL_VERSION: 2.6.35-rc1
> SUBJECT: duble spinlock in function elp_start_xmit
Not only in elp_start_xmit. This driver is for a pretty old and slow isa
ethernet card and I think nobody cares. To quote a comment from the
source: "[...] the concurrency protection is particularly awful".
Thanks,
Christoph
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: double spinlock in "drivers/net/3c505.c"
2010-06-08 13:26 ` Christoph Fritz
@ 2010-06-18 3:12 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-06-18 3:12 UTC (permalink / raw)
To: chf.fritz; +Cc: strakh, philb, craigs, tridge, Alan.Cox, netdev, linux-kernel
From: Christoph Fritz <chf.fritz@googlemail.com>
Date: Tue, 08 Jun 2010 15:26:45 +0200
> On Mon, 2010-06-07 at 15:17 +0400, Alexander Strakh wrote:
>> KERNEL_VERSION: 2.6.35-rc1
>> SUBJECT: duble spinlock in function elp_start_xmit
>
> Not only in elp_start_xmit. This driver is for a pretty old and slow isa
> ethernet card and I think nobody cares. To quote a comment from the
> source: "[...] the concurrency protection is particularly awful".
Indeed, I spent some time trying to unravel the locking mess
for these call chains to check_3c505_dma() and it was just
too much to sanely cure.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-18 3:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 11:17 BUG: double spinlock in "drivers/net/3c505.c" Alexander Strakh
2010-06-08 13:26 ` Christoph Fritz
2010-06-18 3:12 ` David Miller
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).