Received: by 10.213.65.68 with SMTP id h4csp466193imn; Fri, 16 Mar 2018 08:35:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELtj3Vz14z0zzk/hvE5YKC68wIfpcVk9ffG1hVBw16tQgxLrvSA/L5Aziza4zpzuR5PJB4+H X-Received: by 2002:a17:902:34f:: with SMTP id 73-v6mr2615909pld.55.1521214552981; Fri, 16 Mar 2018 08:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521214552; cv=none; d=google.com; s=arc-20160816; b=NgM1UjrtaqzeQ/bz8TYVYSxeza78zIZcxTvcKThUx4qdv9cKr0azjiMgtfGuMLBla9 ce0FRR5DIGsLdAx8e9RiaUurl1B6yL+313iZISvhjmqHTo/x460zzGF0eVBaMNgF6al/ lcDuaROTykKnNa593023d3/9qpYg1WtTG7ci2W/evcwQaxM3t74eNor1tPBaD16Pau62 epZoPQY9RZ4C/b8KmOUBEf+A8r6L8zfmK58b63BnIrRMqCERGCRVaF1cY2n6kZEhAFAZ PmFjm8aS5h12hhpZHyITyV0qCKvR+Q/QICpv8DctxRaU8kVQQc/44gMCePI/YraNIBbX LErw== 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=5Npiv27qA39s1yZRz7RGXt+pH4SEkUem55OuY6V+4Hk=; b=gG9MG9MsHC/nQ4CqsY1vQT8wsBwjwBDxBKxBxueCIL+qiy9hyhojx1YT1OUVcQmmWY DZzvbtEjJxY0ynieL3uhB7htUS15JEwUgk9/P7tMUoVdBIxAaMtYJF84AVai1qi30zpm a2HYUh/YlCkJE+19c/fgtiQXU2AaxQpZnUE4+vf9sYzFX1q/rfPcZ1MP0mQSy1hHJxkR e7jY+F9t6QAVK315MoUXHtNZhcQ72cur8UYwwHivfVt0PPa4Xz9JUaAKF1rG2Xqr5gTc EVzjBPC5tu3dP6PWclayQY3rBGNZN2olI7BpAV1BKumF2tPfOR3R4Yp7Qs1GJap0BsMa yp+Q== 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 u21si5684503pfl.176.2018.03.16.08.35.38; Fri, 16 Mar 2018 08:35:52 -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 S933614AbeCPPco (ORCPT + 99 others); Fri, 16 Mar 2018 11:32:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38092 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933573AbeCPPck (ORCPT ); Fri, 16 Mar 2018 11:32:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A26511162; Fri, 16 Mar 2018 15:32:39 +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.9 66/86] scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport Date: Fri, 16 Mar 2018 16:23:29 +0100 Message-Id: <20180316152321.840251254@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152317.167709497@linuxfoundation.org> References: <20180316152317.167709497@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran commit 063b36d6b0ad74c748d536f5cb47bac2f850a0fa upstream. Current code manually allocate an fcport structure that is not properly initialize. Replace kzalloc with qla2x00_alloc_fcport, so that all fields are initialized. Also set set scan flag to port found Cc: 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_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5789,7 +5789,7 @@ static fc_port_t *qlt_get_port_database( fc_port_t *fcport; int rc; - fcport = kzalloc(sizeof(*fcport), GFP_KERNEL); + fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); if (!fcport) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, "qla_target(%d): Allocation of tmp FC port failed",