Re: Defination of Flag CONFIG_DEBUG_SPINLOCK_SLEEP in AS4 UP1

From: Christoph Hellwig
Date: Tue Aug 16 2005 - 05:13:09 EST


What's AS UP1 in your subject?

On Tue, Aug 16, 2005 at 03:37:07PM +0530, shahid shaikh wrote:
> Hi all,
> While doing insmod for a psuedo driver, kernel is dumping a stack because
> sleep function is called.
> My init_module function for psuedo driver calls add_disk to register admin
> device.
> In add_disk(), kernel is allocating memory using kmalloc with flag
> GFP_KERNEL. This is hardcoded in kernel code for add_disk.
>
> Whenever kernel inserts any module or driver it disable all interrupts.

No, it doesn't you must be doing it yourself somewhere, probably using
a spin_lock_irq or spin_lock_irqsave. If you can't find the problem
yourself post your module source to the kernelnewbies@xxxxxxxxxxxx list
the deals with such basic problems.

-
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/