Re: please DON'T run 2.5.27 with IDE!

Jens Axboe
2002-07-24T12:38:27Z

On Wed, Jul 24 2002, Bartlomiej Zolnierkiewicz wrote:
> > 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...
>
> You really don't know.
>
> And funny thing is I have diffirent blk_start_queue() function in my tree
> (2.5.27) ? Without described above race and without possibilty of
> recursion...
>
> 2.5.27:drivers/block/ll_rw_blk.c
> void blk_start_queue(request_queue_t *q)
> {
> if (test_and_clear_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)) {
> unsigned long flags;
>
> spin_lock_irqsave(q->queue_lock, flags);
> if (!elv_queue_empty(q))
> q->request_fn(q);
> spin_unlock_irqrestore(q->queue_lock, flags);
> }
> }

Yep, the version Martin posted must be really old.

--
Jens Axboe