Received: by 10.213.65.68 with SMTP id h4csp447839imn; Tue, 13 Mar 2018 09:21:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELtaH13x2f3caiOJbQzkCz8m9709ao/4U4JOwNQC1lcJZV1r8juTa6+lT2rvYHAzu1ujdJZu X-Received: by 2002:a17:902:2a43:: with SMTP id i61-v6mr1100966plb.54.1520958061321; Tue, 13 Mar 2018 09:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520958061; cv=none; d=google.com; s=arc-20160816; b=L8mHvC5feqNy/IdHM/iEJgh0zswpi9EiUvp0ZUR4xkdZqZL+B27pFtjrZxv1u5OWxt tocu/5EVghpxHthZmp0LPyYAifXd+Fnnle6GFzJZPtI6K68zXoVd7FQCM0UocZOXC0H2 T+7jaQOT/wYMwGXuY5nIbo0cxlqJa30LVpFsKFdJqbYHyCOHcVNMKCWsczQMYcnRMHqp VLxGdfgDQm18zoFo3DNgovShOe3XvCnKfk7oVW1FNwGx1NbvSFk5pAi9iUhjKumMfChd mdIzJ6Vi0Q9lTN6QZn4D8Y4eOdrOw/5XhEsOK4kf8KT44vXcqJVL5Ipt+rognicsYbot t4hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=GE3myyTBuCjJ3Xo/jcBqWQUeiZUspG1wGbVippm94Tw=; b=UjskMHtNTonK8LF8mbUt3GH6QtNLXHo3QNofKzsQbQHKhX2SGALT5vi7MsELlzbdeU V6gUC/eC/aDUeuFjx/aBX577qk2EtNBy3RlYZeXK9emZ7LCQLPwTw5HvD7XUZ/ywIZzu nrpcKw/A5X/xU3Om96+BdXAegPCIwlm/CSVMjx1f4bLf8f2OHs8CIb3Iky1y/fPC9f/+ JfxIiRc4PDcOOF1VUJdnw5GwA0RM173E8lViLFl8gBUd/26Dj1yBxfeuC0e7lw9SV8qI 1d4TMIIze9HuBTAl/mvhxzxOzlvV9g08mfqD0TxeizGiA+4s9DXR+WM6eJgmOb486ZlZ DWfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si275295pga.495.2018.03.13.09.20.46; Tue, 13 Mar 2018 09:21:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934055AbeCMQSx (ORCPT + 99 others); Tue, 13 Mar 2018 12:18:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32952 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933849AbeCMPew (ORCPT ); Tue, 13 Mar 2018 11:34:52 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CB6D8107E; Tue, 13 Mar 2018 15:34:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Himanshu Madhani , Hannes Reinecke , "Martin K. Petersen" Subject: [PATCH 4.15 125/146] scsi: qla2xxx: Fix gpnid error processing Date: Tue, 13 Mar 2018 16:24:52 +0100 Message-Id: <20180313152329.854024033@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran commit 22e786ea47f8795c561e1a01b6a66bb2cae2fc20 upstream. Stop GPNID command from advancing if command has failed. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_gs.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3211,6 +3211,11 @@ static void qla2x00_async_gpnid_sp_done( sp->name, res, ct_req->req.port_id.port_id, ct_rsp->rsp.gpn_id.port_name); + if (res) { + sp->free(sp); + return; + } + memset(&ea, 0, sizeof(ea)); memcpy(ea.port_name, ct_rsp->rsp.gpn_id.port_name, WWN_SIZE); ea.sp = sp;