From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f175.google.com ([209.85.161.175]:46997 "EHLO mail-yw0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbeDKVaK (ORCPT ); Wed, 11 Apr 2018 17:30:10 -0400 Date: Wed, 11 Apr 2018 14:30:07 -0700 From: Tejun Heo To: Ming Lei Cc: Jens Axboe , linux-block@vger.kernel.org, Bart Van Assche , Christoph Hellwig , Sagi Grimberg , Israel Rukshin , Max Gurtovoy , stable@vger.kernel.org Subject: Re: [PATCH] blk-mq: fix race between complete and BLK_EH_RESET_TIMER Message-ID: <20180411213007.GR793541@devbig577.frc2.facebook.com> References: <20180411205529.31145-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411205529.31145-1-ming.lei@redhat.com> Sender: stable-owner@vger.kernel.org List-ID: 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