The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alexander Strakh <strakh@ispras.ru>
To: Philip Blundell <philb@gnu.org>
Cc: Craig Southeren <craigs@ineluki.apana.org.au>,
	Andrew Tridgell <tridge@web.rsise.anu.edu.au>,
	Alan Cox <Alan.Cox@linux.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: BUG: double spinlock in "drivers/net/3c505.c"
Date: Mon, 7 Jun 2010 15:17:28 +0400	[thread overview]
Message-ID: <201006071517.28744.strakh@ispras.ru> (raw)

	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)

             reply	other threads:[~2010-06-07 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 11:17 Alexander Strakh [this message]
2010-06-08 13:26 ` BUG: double spinlock in "drivers/net/3c505.c" Christoph Fritz
2010-06-18  3:12   ` 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=201006071517.28744.strakh@ispras.ru \
    --to=strakh@ispras.ru \
    --cc=Alan.Cox@linux.org \
    --cc=craigs@ineluki.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=philb@gnu.org \
    --cc=tridge@web.rsise.anu.edu.au \
    /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