Re: [PATCH] blk-mq: fix race between complete and BLK_EH_RESET_TIMER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Ming.

On Thu, Apr 12, 2018 at 04:55:29AM +0800, Ming Lei wrote:
...
> +		spin_lock_irqsave(req->q->queue_lock, flags);
> +		if (blk_mq_rq_state(req) != MQ_RQ_COMPLETE_IN_RESET) {
> +			blk_mq_rq_update_aborted_gstate(req, 0);
> +			blk_add_timer(req);

Nothing prevents the above blk_add_timer() racing against the next
recycle instance of the request, so this still leaves a small race
window.

Thanks.

-- 
tejun



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]