is WARN_ON(irqs_disabled) in dma_free_coherent() spurious ??

From: Tony Olech
Date: Fri Sep 04 2009 - 06:54:38 EST

I am trying to develop a linux kernel driver for a USB
device and I am initially following the example driver
usb-skeleton.c and also the driver usblcd.c

The sequence:

in the file operation ..write():
usb_buffer_alloc(a big buffer)
usb_fill_bulk_urb(for an OUT pipe)
then in the completion ..callback():
the routine dma_free_coherent() is called which calls

and because I am running the kernel with all the debugs
and warnings switched on I get a stack dump in the system

Because I do not want to see warnings unless I am doing
something wrong I have to investigate the (possible)
problem. As far as I can tell the WARN_ON() is completely
spurious. Is that correct?? If so what is the solution
and who will change the drivers that use the same algorithm??

Many thanks,

Tony Olech

Elan Digital Systems Ltd

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at