Re: Wait queue crash

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sat Feb 19 2000 - 09:59:17 EST


Suresh Thennarangam wrote:
>
> We are having this problem with wait queues on linux 2.3.28 kernel
> (and 2.2.12 as well)
> The code is simple .. and it crashes. I can see other code in
> the linux usb stack using exactly the same thing. Does anyone
> have a clue ? I've read about reentrancy issues but the code
> here doesn't really do much. Thanks for your input.
>

* don't use interruptible_sleep_on(), the function can lock up unless
your code is protected by the big kernel lock [and new code shoudn't
rely on that lock].
If your code doesn't need any spinlocks, then you could use
wait_event_interruptible(), otherwise copy the code from
wait_event_interruptible() and release your spinlock just before calling
schedule().

*
> static void intr_handler(void *ptr)
> {
>
> mc_tq_task.routine = defered_proc;
> mc_tq_task.data = dev;
>
> init_waitqueue_head(&mc_tq_wait);
>
> queue_task(&mc_tq_task, &tq_scheduler);
> interruptible_sleep_on(&mc_tq_wait);
>
> }

Do you try to sleep within the interrupt handler? You can't do that.

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:23 EST