Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp630694imu; Fri, 11 Jan 2019 06:29:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7L/VL1SqkfpIoNY121l6LX3xEuh91gLRPSMrVKzeT1BdwNRxzBQ11wR8GuYbOC52u3P+jZ X-Received: by 2002:a17:902:4503:: with SMTP id m3mr15101990pld.23.1547216987099; Fri, 11 Jan 2019 06:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547216987; cv=none; d=google.com; s=arc-20160816; b=iQ254d5aDCvm415z8Ux/wS9Hn3QIYwBvc+XhwZjD/Dn7jdk5nQZK7a14kvUi3VZOHV ZUZL1upqTxq11Bjf+tVw1VqLCo75l59xfDK7A11foBlMaH8+cgPZkv5d9dUPXaTUytYe 3NrihXojLb8lGOnyaiyZk3X/FKJbldeHVJGIDFmlmzuLLYYSr1K1EIq26Tag0m4tuBSx 2KayhudujQZhWzmAHf7LHds4KzsYNSfj8m212crbNMk3fdBiD0FXwiAXcteQPiE1ryXN JSL4miuqtBOFE4f7UAqg105Df59cOr35qIjtVtWK6d2NtiKy7iAc9bBSWJaqIfhPy4+1 kU6w== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J9xkVzlRBIgYrzEtmH48kumRN5sx5IDqvwOFIqY1I/o=; b=LrCmpnZgvaTFko2I23bOaYd6UedzwgPtqFIID8BG3XYCf0vISPVzLVlfzQlMV04B3k 9gjk2srw7OecoTVy87OOKEj9Xd7ysGMOq3GTL2YVkhmnkr4HGJGcw3k4g5+v8CnPy2Lc Tx/kWWn+D15eQmYFNol2UMhDWdlHXxII1WryDqvTJCkeSvhS2cNU1cs7x+ShpSINxHsW GP5rCLi6yg2Xa2ndBs0+3eNgNdA8fleHo1ySU37OaRp5THBdBpd6D3/w+UnIz1Ult/pV 8KoY5GC04A+dVWukYAHanNEY3CtIGVrx3mXwO7zkzM2mH/wWleSRmkY1UtnJUYuD320D u/Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JHFBuXwF; 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 j66si30119175pfb.182.2019.01.11.06.29.31; Fri, 11 Jan 2019 06:29:47 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=JHFBuXwF; 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 S2387631AbfAKOY5 (ORCPT + 99 others); Fri, 11 Jan 2019 09:24:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732115AbfAKOSu (ORCPT ); Fri, 11 Jan 2019 09:18:50 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B33882177B; Fri, 11 Jan 2019 14:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216330; bh=nA1vyRUxulD6OO+GhsiOQZgx6pMhiowWilBltptJF1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JHFBuXwFi4+g8Rgo442ikUOq1MrhZwXhF4dIvPfRos31HL8rKQkCuErlSSKG37b0f 1pQpa8NVnLif4Fr2vnCfs1S6P2mDoKyx2ek0hur1vy39N7Li1MY+xq9TovQX4kkNiW ykzLeoIrix3cGkGSwEOGqcuwx8oMKkIJeNSS1jJs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.4 61/88] scsi: bnx2fc: Fix NULL dereference in error handling Date: Fri, 11 Jan 2019 15:08:30 +0100 Message-Id: <20190111131056.282264954@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131045.137499039@linuxfoundation.org> References: <20190111131045.137499039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 ] If "interface" is NULL then we can't release it and trying to will only lead to an Oops. Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index d0b227ffbd5f..573aeec7a02b 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2279,7 +2279,7 @@ static int _bnx2fc_create(struct net_device *netdev, if (!interface) { printk(KERN_ERR PFX "bnx2fc_interface_create failed\n"); rc = -ENOMEM; - goto ifput_err; + goto netdev_err; } if (netdev->priv_flags & IFF_802_1Q_VLAN) { -- 2.19.1