Received: by 10.213.65.68 with SMTP id h4csp442415imn; Tue, 13 Mar 2018 09:10:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELt8EqhIIsLa6zbFkna+pEq85mflzO6f9U71llA62OldHArwAavRiintrTVaUwUnw5DtMddP X-Received: by 10.101.97.139 with SMTP id c11mr904621pgv.443.1520957445489; Tue, 13 Mar 2018 09:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957445; cv=none; d=google.com; s=arc-20160816; b=ox5WMwzBsitc54FEOtlVb1n6d3AFu+0vNvTKFxE7/xhmUib26atxAVSO6ljwbEa4Sa DOC3D9CDsl8EySID9eQuWPM/bRTL8+axAdbnF/RvMyPObAfVMNb0kXr5K6U2Lpm0PjUi NTsOLfB3/NOmdxF2X55elawM8XsMdNvrW1YKssk0m+vlx0HHLLp9XNULCsua03TBcJXJ SUY9JG+dcFusXS+P/x56TMH9SCA8LekQ4uKcSP2CQ7ZwwmamIkYvauc2X3w1l3hIWbww TsKoS+RSw7NU0By9QZ+H8EfnngE/NB2kohT0Mc72+1kyhTsxWW3cfVd7uPehYjtCYnBY P67w== 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=xuNjnC1m5k1zinVdMmClZTRJ/mnqtYM7Q7a8ru4sFhA=; b=TTLTHBU8+CNiQFLcORj+mty6R2fJMnKc2ic7l2YtZNxlSswBm9g+ujpQ1Q9iHZhkaC QYE7UgmvLk/zo60yW0ksJpCzmchuYxDDQYagSBzbAzYueqVKQrjcP9ml8bSQyJPA0IE7 zNkX/u0FrAEJ00gzRpzRFiOvxMMS61WP4S/PLLq9oz7Y/SRQX22cYlzOvzMvjQGP7onm eQjrVjLTMh3j5S5pe3rsc35ACF6oEVWjTFzjVy7vke4QddfgWtmn+MmN9DXwwCQ9Hdpy NmhdfA3EDSvXqWAwfQDrYxtO0EmQ1FiH+cKccRl0DD4vQL51wwyJ6WDfyopD055eET2F zngg== 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 bb5-v6si322996plb.407.2018.03.13.09.10.31; Tue, 13 Mar 2018 09:10:45 -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 S934094AbeCMQIL (ORCPT + 99 others); Tue, 13 Mar 2018 12:08:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33610 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbeCMPgg (ORCPT ); Tue, 13 Mar 2018 11:36:36 -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 E37F410DF; Tue, 13 Mar 2018 15:36:35 +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.14 036/140] scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport Date: Tue, 13 Mar 2018 16:23:59 +0100 Message-Id: <20180313152500.547323028@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@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.14-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 @@ -5759,7 +5759,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",