[BUG] ali-ircc.c sleeping function called from invalid context

From: Alexander Strakh
Date: Thu Oct 08 2009 - 04:21:10 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/