From linux-kernel Tue Jul 13 22:25:32 2004 From: Andrew Morton Date: Tue, 13 Jul 2004 22:25:32 +0000 To: linux-kernel Subject: Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Message-Id: <20040713152532.6df4a163.akpm () osdl ! org> X-MARC-Message: https://marc.info/?l=linux-kernel&m=108975793832484 Andrea Arcangeli wrote: > > > Sleeping with local interrupts disabled is usually a bug, so we should > > prefer to keep that check in might_sleep(). > > either it's _always_ a bug including for entry.S or sched_yield, or it's > _never_ a bug. I don't understand the "usually". If some code does: local_irq_disable(); kmalloc(GFP_KERNEL); local_irq_enable(); or local_irq_disable(); function_which_calls_cond_resched(); local_irq_enable(); then we want might_sleep() to warn about the bug. The fact that a couple of scheduler-internal fastpaths happen to know that they can call schedule() with interrupts disabled is not relevant to this. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/