Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3286886pxk; Mon, 21 Sep 2020 09:44:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLCF+XJSxg/kX6oKRjQcPJxIWcK5EOKHsYlOlivFoSO7TGLI9Wki+FLKKFiPc+cW55jpT4 X-Received: by 2002:a17:906:4a8c:: with SMTP id x12mr302975eju.271.1600706640178; Mon, 21 Sep 2020 09:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706640; cv=none; d=google.com; s=arc-20160816; b=iJcoIzJC5IkS4oO1ydP/mGRu1eXo5Tc3r7McKZL76kwRPl8OeptLLd6ZT263DjYni+ FI2YQZMbKqBpOXHCqMwMqYZsAdHpG81BapikEBw8qCuW8LD/YMJM7Je9nb1UvvYfrbSP 6bzTea9X5IGqSnVMz634fyvbocMWNf3FUjRXgdheyW3EFdw2C66GGP7/yS30znPYDD1i 1m9nYCzpvbs/AelvwdJR3fiLD0Xepz8JCQpQbwJPGUDN2HbHHipHX8RAkkVRJ14CISnX vHEqOmjTYf8ej62pYZr4e+HF/KahPryGHkpNh2C1fQs2t62p1lJ2oymMLrbJsMcUHWee 9/Zw== 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=FyUmtMfRDnWXJHsBSPgaUwOqVZc/ScNFGOGbboK73fQ=; b=zPfWYbD2RuVpYE9IS30ziSL+IhpOiBDdqAVAu7FgpsdlpVZe42/ZiqMJwpZslDxSIL GxmXz1XOPVh42jTAuvyIQVxH+qhE8XCkAXPdzpmLRdF9blc9S48O2u1CdtCSKWIXjagf sZjyldqhN+YOWPvD52QhjXNHbJwZ2CL30GAq4Ktkjw765/0GVvFADpUZpd9lc/v1RuMr 2sRZ6VmlMnhqqwV7V/XoaciR8M/DAov/YzJTjXtGrY6f9JuMgAeuERyZKYsYGrIseVmh QZO8a6fgT/MDbSNwoHGxLCSR/koHs1FtNz6BouiVLixNuJr6HyJYkjdfYAYnyNr8Pu9i Q1EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QACRubxr; 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 y11si8050487ejf.471.2020.09.21.09.43.35; Mon, 21 Sep 2020 09:44:00 -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=QACRubxr; 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 S1729283AbgIUQji (ORCPT + 99 others); Mon, 21 Sep 2020 12:39:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:41356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728857AbgIUQjZ (ORCPT ); Mon, 21 Sep 2020 12:39:25 -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 A0891238EE; Mon, 21 Sep 2020 16:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706365; bh=Gq+FUXLYeR0sXqEbuud5W6hNeqLYZJKW3NtM+LU8lh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QACRubxrwHqK1uvO5LPA7KWtttgn+aT4YZYhL7SV7KqG5/Pay244xO3uPufjF4NzQ Tky3KAoeP2JGBkBzOrbpZ8RR4d3ofI5uNhqV+K4o9u9TVEJP+mEzFLCWOEeqJOrxx1 8obv3Xb1bexuUj13tjbLow7sm0LT5We43gjMS9UY= 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 4.14 71/94] nvme-fc: cancel async events before freeing event struct Date: Mon, 21 Sep 2020 18:27:58 +0200 Message-Id: <20200921162038.786478956@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@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 e126e8210e950bb83414c4f57b3120ddb8450742 ] Cancel async event work in case async event has been queued up, and nvme_fc_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/fc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 13c89cc9d10cf..e95d2f75713e1 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -1566,6 +1566,7 @@ nvme_fc_term_aen_ops(struct nvme_fc_ctrl *ctrl) struct nvme_fc_fcp_op *aen_op; int i; + cancel_work_sync(&ctrl->ctrl.async_event_work); aen_op = ctrl->aen_ops; for (i = 0; i < NVME_FC_NR_AEN_COMMANDS; i++, aen_op++) { if (!aen_op->fcp_req.private) -- 2.25.1