Messages in this thread | | | Date | Fri, 25 Oct 2002 10:04:46 +0100 | From | Russell King <> | Subject | Re: module_init in interrupt context ? |
| |
On Fri, Oct 25, 2002 at 08:15:05AM +0200, Armin Schindler wrote: > > You are never allowed to sleep with a spinlock held, no matter if it's > > _bh, _irq or just a plain spin_lock(). Doing so creates the possibility of > > deadlock (assuming your lock actually is necessary and you're not > > serialized already), current 2.5 btw has debugging code which checks for > > this bug. > > > > So this code was buggy in earlier 2.4 as well, you'll have to create your > > proc entry outside the protected region or use a semaphore instead of a > > spinlock. > > Okay, I wasn't aware of create_proc_entry() must to be called > from user-context and outside any locks. > > But anyway, isn't the statement "in_interrupt() != 0" somehow wrong > when just the bh's are disabled ?
You must not schedule with bottom halves disabled.
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
- 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/
| |