inconsistent lock state on call to kmem_cache_zalloc()

Daniel Baluta daniel.baluta at gmail.com
Thu Mar 17 17:46:42 EDT 2011


On Thu, Mar 17, 2011 at 10:59 PM, Arvid Brodin <arvid.brodin at enea.com> wrote:
> Hi,
>
> Daniel Baluta wrote:
>> Hello,
>>
>>> The call to kmem_cache_zalloc() never returns; the printk() text on the line
>>> after is never displayed and the system locks up. The printk() om the line
>>> before displays.
>>
>> What flags are you passing to kmem_cache_zalloc?
>
> I'm using the flags passed to the urb_enqueue() function; a printk reveals
> the value is 16, which would be GFP_NOIO if I read include/linux/gfp.h correctly.

Hmm, I guess this is not quite OK. You hold a spinlock, and you can sleep
while allocating memory.

Daniel.



More information about the Kernelnewbies mailing list