mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Strakh <strakh@ispras.ru>
To: Benjamin Kong <benjamin_kong@ali.com.tw>,
	Samuel Ortiz <samuel@sortiz.org>,
	rda-users@lists.sourceforge.net,
	Linux Kernlel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BUG] ali-ircc.c sleeping function called from invalid context
Date: Thu, 8 Oct 2009 12:22:29 +0000	[thread overview]
Message-ID: <200910081222.29956.strakh@ispras.ru> (raw)

	KERNEL_VERSION: 2.6.31
	DESCRIBE:
Driver reports/drivers/net/irda/ali-ircc.c might sleep in attomic context, 
because it calls ali_ircc_change_speed after spin_lock_irqsave:

drivers/net/irda/ali-ircc.c:
2028static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, 
int cmd)
...
2056                spin_lock_irqsave(&self->lock, flags);
2057                ali_ircc_change_speed(self, irq->ifr_baudrate);         
...

Path to might_sleep macro from ali_ircc_change_speed:
1. ali_ircc_change_speed calls ali_ircc_sir_change_speed 
./drivers/net/irda/ali-ircc.c:999
2. ali_ircc_sir_change_speed calls spin_lock_irqsave at 
./drivers/net/irda/ali-ircc.c:1084

Found by: Linux Driver Verification


             reply	other threads:[~2009-10-08  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 12:22 Alexander Strakh [this message]
2009-10-08 14:45 Alexander Strakh

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=200910081222.29956.strakh@ispras.ru \
    --to=strakh@ispras.ru \
    --cc=benjamin_kong@ali.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rda-users@lists.sourceforge.net \
    --cc=samuel@sortiz.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

all inboxes | Powered by JetHome®