Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3289698pxk; Mon, 21 Sep 2020 09:48:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBJB9f0WFAeFSnphn+7YMIWTTu3ypgUJnsnc+qunDjWE9yWIs/9X5B0nJEc+DAO1tSKLRJ X-Received: by 2002:a17:906:7cc6:: with SMTP id h6mr365376ejp.266.1600706900438; Mon, 21 Sep 2020 09:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706900; cv=none; d=google.com; s=arc-20160816; b=UaHstOudAMZ2P13BUC8Ob6aqOClsANkAO+j5Lm6DCSrFws9JT8PyFqZNy1RDqoxRJY nANGXM5Ls276CzZyFIK5jpLgqB0eUwL2SL127yqZ78A1/p2AfEUCnnxr9vc10ClRtA0G XShBbWZQDrBS4CLjKghlFmS0UkIb2eylNBPatGwP2PE8DprFokV6cfdaQry+8qvrAwbC 3tTJgnCogHKqKN6iei1MsQMlbyMQKqvXX+nAaKW1SOitnPT0RpFxjTXXQUQhmyW+8fzY wMIWR+MkozVxlyimjz2KLfvHRlOZ5IVwGww8E8W/y/f+U7/yVUZyZtHq981nHhW4YjbK 7/ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cskB6q6Zpv8BrWbDMewLBzvFPPXWRDNSlShxfuStUjo=; b=pQFodCvHeLOP37CwMtDPcaPZAudMP6soPoX+OgZIa75WL39/beSmoIGe9QWM0xl3vi MdQSO0x9yIM8eXqe+YpM/c8DYQ51lrx7ocFCrayt4Yv8m+6L7aN606wXyA4atRgn68mJ r7uHG/eyVjV0L25EnDlU5ma55Kq4IaSgH7oE0Ml2Yf3gbgiGH1S5KZZYiqm0J/yC92oz 6EHO8261EQEwTxK3INgJHqpPtdcN4gvV/Qb29JZKlV0p5sUqwsDYfoZxCFWFMS02pWdW /a0oRUwOwEVradq/aeUQRU9hwIkNLM2A4wVusrMLBl7bC5QoizPt64SgFSfyonD56dqm CQmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jflbdDLf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si8607054ejj.34.2020.09.21.09.47.56; Mon, 21 Sep 2020 09:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jflbdDLf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbgIUQo7 (ORCPT + 99 others); Mon, 21 Sep 2020 12:44:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:50600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729711AbgIUQo5 (ORCPT ); Mon, 21 Sep 2020 12:44:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3532E23976; Mon, 21 Sep 2020 16:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706696; bh=jE+KNy6sH2GYUyNViDM63N8Nh9eGlpSBcc4XAXHGl3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jflbdDLfomV1ZEKOHJ5LlhG4PC5DZ97YJDRUQtamVd5BjmCCqZ2TrxWP3yfH91Iaa 9O0KSa2SUsEpfsEMOYOBJq2LA79Bqui9dBznQm9Ld58hocqQ3Uwq9yzfxewj9aNBjf el+CXAZIZ8Me5k9t9s2TXxVMuo7cS3jeZjaRdcto= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Milburn , Keith Busch , Sagi Grimberg , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.8 027/118] nvme-rdma: cancel async events before freeing event struct Date: Mon, 21 Sep 2020 18:27:19 +0200 Message-Id: <20200921162037.576388687@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Milburn [ Upstream commit 925dd04c1f9825194b9e444c12478084813b2b5d ] Cancel async event work in case async event has been queued up, and nvme_rdma_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/rdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 6c07bb55b0f83..4a0bc8927048a 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -809,6 +809,7 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); } if (ctrl->async_event_sqe.data) { + cancel_work_sync(&ctrl->ctrl.async_event_work); nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, sizeof(struct nvme_command), DMA_TO_DEVICE); ctrl->async_event_sqe.data = NULL; -- 2.25.1