Received: by 10.213.65.68 with SMTP id h4csp451275imn; Tue, 13 Mar 2018 09:27:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvxgnjGfutmpKau4dE8dEs3IfPOEkLi7duG1+/MQ2ONTcshVnl6LimBMsRWYefYFENTdLA/ X-Received: by 10.98.186.2 with SMTP id k2mr1142574pff.225.1520958466078; Tue, 13 Mar 2018 09:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520958466; cv=none; d=google.com; s=arc-20160816; b=B4oQI6tyVOi11TkjeM4W6CSKr3ocSZdYCg+6qLf2SUftmx1QfaOuFz80v7vii988QV 0VefKK+t5m69JeXNRZMEW3+hksjI17X48bs+yCf3/f0JlvP6KohX4ZYazCv05N/DBIM1 KfvKN2Ukr8ckvKinm1CZWf9xyPGuyFkrHRK1HiC+2UgwQ6cMz4oHtOioyHyaqbH0w1uv SyphViVvSln7Vf3PITi004/mKLTzpjnW8qyqs66WrRKldel7dEyED+D39QL1G/AmTk3t dNhqBdzT9SCduTvudX1VsAa4S67+4EFQkO/wCK9eQ1XzO4qUFF1KGkdtlz3m+KjkTKjg hfjg== 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=wD4tTV3qQ/rtaCmL3kjhQcNfcfMttH5u12Y839+w5jI=; b=Tjc2bylFpavRRWJ55Ouwfw83y9XStKKwRwd+sW5JFni0uxGCT3AGH8ewOvnBnWJGbq rXKk4KRes+e/j9V091woY0Lf67Dw5DVOaCGAb74zLJBR0N88STosJH86hWygdihP4OSP ndQt+zH+VnvwRxAVmuvRxtwflC+xibld4gKC8civDlPMBbaPtlkKliTw9Y/F+Jze8065 uyQhDl8oI/y4XL+LXQkUThyhRdrwtGM7xg0qJhSPBv459bkyMLZMEWX/VzIc+R3Muhjw bl4iTnLIeh5z5Jrgl4U6/6clHB8n/9eeiUl6jh/Oash8pMSgb/FL9AgifDkL0kJGbpyY 6S2w== 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.27.31; Tue, 13 Mar 2018 09:27:46 -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 S933686AbeCMPeF (ORCPT + 99 others); Tue, 13 Mar 2018 11:34:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60920 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933667AbeCMPeA (ORCPT ); Tue, 13 Mar 2018 11:34:00 -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 0617B1025; Tue, 13 Mar 2018 15:33:59 +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 137/146] scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport Date: Tue, 13 Mar 2018 16:25:04 +0100 Message-Id: <20180313152330.670470131@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 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 @@ -5782,7 +5782,7 @@ static fc_port_t *qlt_get_port_database( unsigned long flags; u8 newfcport = 0; - 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",