mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [BUG] ali-ircc.c sleeping function called from invalid context
@ 2009-10-08 14:45 Alexander Strakh
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Strakh @ 2009-10-08 14:45 UTC (permalink / raw)
  To: Benjamin Kong, Samuel Ortiz, rda-users, Linux Kernlel Mailing List

	KERNEL_VERSION: 2.6.31
	DESCRIBE:
(wrong message before that)
Driver reports/drivers/net/irda/ali-ircc.c  - get spin_lock twice 

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 second spin_lock_irqsave(&self->lock, flags)  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:

1050static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 
speed)
1084        spin_lock_irqsave(&self->lock, flags);

Found by: Linux Driver Verification


^ permalink raw reply	[flat|nested] 2+ messages in thread
* [BUG] ali-ircc.c sleeping function called from invalid context
@ 2009-10-08 12:22 Alexander Strakh
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Strakh @ 2009-10-08 12:22 UTC (permalink / raw)
  To: Benjamin Kong, Samuel Ortiz, rda-users, Linux Kernlel Mailing List

	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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-08 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 14:45 [BUG] ali-ircc.c sleeping function called from invalid context Alexander Strakh
  -- strict thread matches above, loose matches on Subject: below --
2009-10-08 12:22 Alexander Strakh

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®