[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140917164400.GA18472@lst.de>
Date: Wed, 17 Sep 2014 18:44:00 +0200
From: Christoph Hellwig <hch@....de>
To: Ming Lei <ming.lei@...onical.com>
Cc: Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] blk-mq: fix race between timeout and queue_rq
On Wed, Sep 17, 2014 at 05:47:57PM +0800, Ming Lei wrote:
> Either the request is from requeue or just being allocated from
> tag pool, its REQ_ATOM_STARTED flag has been cleared already, so
> don't test it in blk_mq_start_request().
>
> One memory barrier is needed between writing rq->deadline and
> setting REQ_ATOM_STARTED so that timeout can't happen too early
> if timeout handler reads obsolete rq->deadline caused by out
> of order of the two writes.
Looks reasonable to me,
Reviewed-by: Christoph Hellwig <hch@....de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists