Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1269528ybg; Tue, 2 Jun 2020 05:52:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUm88f4c/i8mMTr42LJvU9bg4ImJfHH5Y0kwhhEjW9j52T32LrS0VYtz6KBwFBytRa7gtu X-Received: by 2002:a50:fd04:: with SMTP id i4mr27010847eds.43.1591102377493; Tue, 02 Jun 2020 05:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591102377; cv=none; d=google.com; s=arc-20160816; b=M20ijna/CnVG1oyBDDPePndktvFFRV4PLMUYoMLpl4v/9YTlTCAXNfDT/l+EHuyeNi CC5ag5KIPqkYU+o8I7EV/JJPzW9TSmytgJMaVhG9t+0+mjzIXdZLDJG5gAw3V3J22ko/ GIGCeEeWkzkQaCXnBSAAiENkUlaqPSG2pImMkhdvDhlzhAUOST2/JKNDJs+9SgZAylGQ nUVA0n6mEJAPqSRKRv88kei7qMw03PfNFwFZWwtGDbSkMz9h/BaIdrKDOo7OY0UnLjIx DFqESiDdAN+eHAEwvMemgx4BtZvdfFRv6ednqrXChAvCX3LbJI6KdHFwBIdTC15Hb0CF INuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PKiTtT1X00iW6GTZdqZLrlzGO4/q7KCNfV/RX2CAG3k=; b=sH4AKBepbJTlCaWLQKHHN1oOMhFznRf+thopen271yd6g3E3WH/d7x+q2MawlEXN0S geX2tIlndDeQriUraQzZgrv3LTw19Qa9p0i6y695k76/iriFLrJOWTEBZO9Zm2RIfPjq tFNXV+bN4pjOsm21T8+nLMpdthhrl1ZC2llMFBy0TV0wrKPD1uX/G7MN0GNEiGwMIFds FOpH4UY7oAhGlPt2o0mrGRaQX3c72/tqs8S0oSByEHEO2Pf9yTfQoLrzdNoFFFQPDyy5 Imh8i+cC/t6SZBS9ueBkHVZ237hP+xlhr67r1Twvu55nTlJIBdwRLiv7AuD6sXLXkIG6 6nSg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr4si1673178ejc.239.2020.06.02.05.52.33; Tue, 02 Jun 2020 05:52:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbgFBMuR (ORCPT + 99 others); Tue, 2 Jun 2020 08:50:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:52798 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgFBMuR (ORCPT ); Tue, 2 Jun 2020 08:50:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B7DC0AE72; Tue, 2 Jun 2020 12:50:18 +0000 (UTC) Subject: Re: [PATCH] nvme-fc: Only call nvme_cleanup_cmd() for normal operations To: Daniel Wagner , linux-nvme@lists.infradead.org Cc: Keith Busch , Max Gurtovoy , linux-kernel@vger.kernel.org, James Smart References: <20200529113740.31269-1-dwagner@suse.de> From: Hannes Reinecke Message-ID: <44abf3e4-3a81-9c75-980c-41d396034000@suse.de> Date: Tue, 2 Jun 2020 14:50:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200529113740.31269-1-dwagner@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/20 1:37 PM, Daniel Wagner wrote: > Asynchronous event notifications do not have an request > associated. When fcp_io() fails we unconditionally call > nvme_cleanup_cmd() which leads to a crash. > > Fixes: 16686f3a6c3c ("nvme: move common call to nvme_cleanup_cmd to core layer") > Cc: Max Gurtovoy > Signed-off-by: Daniel Wagner > --- > drivers/nvme/host/fc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c > index 7dfc4a2ecf1e..287a3e8ea317 100644 > --- a/drivers/nvme/host/fc.c > +++ b/drivers/nvme/host/fc.c > @@ -2300,10 +2300,11 @@ nvme_fc_start_fcp_op(struct nvme_fc_ctrl *ctrl, struct nvme_fc_queue *queue, > opstate = atomic_xchg(&op->state, FCPOP_STATE_COMPLETE); > __nvme_fc_fcpop_chk_teardowns(ctrl, op, opstate); > > - if (!(op->flags & FCOP_FLAGS_AEN)) > + if (!(op->flags & FCOP_FLAGS_AEN)) { > nvme_fc_unmap_data(ctrl, op->rq, op); > + nvme_cleanup_cmd(op->rq); > + } > > - nvme_cleanup_cmd(op->rq); > nvme_fc_ctrl_put(ctrl); > > if (ctrl->rport->remoteport.port_state == FC_OBJSTATE_ONLINE && > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer