public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Strakh <strakh@ispras.ru>
To: Jiri Slaby <jirislaby@gmail.com>,
	Linux Kernlel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BUG] isicom.c sleeping function called from invalid context
Date: Wed, 7 Oct 2009 17:15:14 +0000	[thread overview]
Message-ID: <200910071715.14853.strakh@ispras.ru> (raw)

	KERNEL_VERSION: 2.6.31
	DESCRIBE:
Driver drivers/char/isicom.c might sleep in atomic  context, because it calls 
tty_port_xmit_buf under spin_lock.

./drivers/char/isicom.c:
1307 static void isicom_hangup(struct tty_struct *tty)
1308 {
...
1315         spin_lock_irqsave(&port->card->card_lock, flags);
1316         isicom_shutdown_port(port);
...

Path to might_sleep macro from isicom_hangup:
1. isicom_hangup calls spin_lock_irqsave (drivers/char/isicom.c:1315) and then 
calls isicom_shutdown_port.
2. isiscom_shutdown_port calls tty_port_free_xmit_buf at 
drivers/char/isicom.c:906
3. tty_port_free_xmit_buf calls mutex_lock at srivers/char/tty_port:48

Found by Linux Driver Verification Project.

             reply	other threads:[~2009-10-07 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 17:15 Alexander Strakh [this message]
2009-10-07 13:31 ` [BUG] isicom.c sleeping function called from invalid context Alan Cox
2009-10-07 14:54 ` Alan Cox

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=200910071715.14853.strakh@ispras.ru \
    --to=strakh@ispras.ru \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox