lkml.org 
[lkml]   [2000]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Wait queue crash
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2011 Jasper Spaans