lkml.org 
[lkml]   [2002]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: please DON'T run 2.5.27 with IDE!
On Wed, Jul 24 2002, Marcin Dalecki wrote:
> >>So look at drivers which call blk_start_queue() from within
> >>q->request_fn context, which is, well, causing deliberate *recursion*.
> >>
> >
> >
> >Are you sure? If so they should first check whether queue is
> >started/stopped, if they don't it is a bug.
>
> void blk_start_queue(request_queue_t *q)
> {
> if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)) {
> unsigned long flags;
>
> ================== possigle race here for qeue_flags BTW.
>
> spin_lock_irqsave(q->queue_lock, flags);
> clear_bit(QUEUE_FLAG_STOPPED, &q->queue_flags);
>
> if (!elv_queue_empty(q))
> q->request_fn(q);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> If we call it from within request_fn then if this isn't recursion on the
> kernel stack then I don't know...
>
> spin_unlock_irqrestore(q->queue_lock, flags);
> }
> }

Care to enlighten us on exactly which block drivers call
blk_start_queue() from request_fn?

--
Jens Axboe

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

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:1.116 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site