Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2686191pxy; Mon, 3 May 2021 05:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMsKmqSi4vJbZuX7jkVotjDMIEpR3zZsqKsUNUkMJSYbnBHpnlJ93xtOvY+M5Jw3ZHNBLe X-Received: by 2002:a63:9d4e:: with SMTP id i75mr17725485pgd.443.1620046674029; Mon, 03 May 2021 05:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620046674; cv=none; d=google.com; s=arc-20160816; b=cXEvGySn2o3BRKA/rEaFiV7fhVG8hP//r5xaAS3PUiWTRw4epHne9988d+WrZeGV+p Sj3TEr3apkHtO6mltBoAm4pmbexsenAjXKZjaDNQkAX/7gGYwsyEzkns4FLR/LBc86xD ei9HhvIpn/oP1E+WNAiGaS2Db+IDPWH8agtPnJ9px4Mm8zQzwhwgu+5DKea+NKiask1S S+DGe5Z955iuiekHdnOqd9NtNxgyZMuJPn9leWn2Y0axChzpbKyrMI78UHLcL3rC8XnO nHStzlYRTgzEUMrG806Udrf42nXho5AYHAQHfeC8xkhAXAFuHbvkM8puvGySs7ZHihMl 602g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5g42+QrsNuA75rdE/jFv7Rnsd9rqQbWjuI7IjazoSn4=; b=DYJTIzr7YGfFPQ0GxlSF0XvtNMh5Ek40mUVMZD8paAjyVfoRRkoicxWui+lzgif811 s22bMmNrqMzf5yG2hxwqJd40MeuKVB1pUQHRzXHa40utg2DpRwzZ+kFnPdcc8Kx+Qznq M2N2ULRq4ul5L+ZEfb0f79yqOGTxkxEhjcPlUwr10ATPj5ccPEe0/xleJeHbBSrrJkrc dom52sPY4TI+ylY3/+ZMDDdwkqVryFmFT3Zt2m1+zizjLC1Q9uEM4X2H9h5cSTCpWsGT vaPDaSKipjtc6mMhPd+/W92bfGDQuQGCT1VxBqHFWq5w9nTPvXcnhUqpOR281cX4vyyl +OfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TlWPNygn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m197si15844390pga.196.2021.05.03.05.57.41; Mon, 03 May 2021 05:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TlWPNygn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233778AbhECMAj (ORCPT + 99 others); Mon, 3 May 2021 08:00:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:34524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233590AbhECMAW (ORCPT ); Mon, 3 May 2021 08:00:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDC9561185; Mon, 3 May 2021 11:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620043169; bh=A8MdzO5tJoC/I0YqqZ1NCiDzDifexm4ATd4RR1/f6lU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TlWPNygnSMtj68bZ5gkKmk1jZor5RCwFk89i5JtlQwq4wRim6CTGW6Gl0tAg/fRGo Iyh0dpVfykgk0AYHNQfb4GUbVUMcNAyuJuQtAGoc1pmFiUjGSXlQfjpPC/iMgTs4uJ vV/Yfg9L7W3AKJzRaCvNf685+pIwxZem9MyNwyeA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , "David S . Miller" , stable Subject: [PATCH 24/69] Revert "qlcnic: Avoid potential NULL pointer dereference" Date: Mon, 3 May 2021 13:56:51 +0200 Message-Id: <20210503115736.2104747-25-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210503115736.2104747-1-gregkh@linuxfoundation.org> References: <20210503115736.2104747-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 5bf7295fe34a5251b1d241b9736af4697b590670. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This commit does not properly detect if an error happens because the logic after this loop will not detect that there was a failed allocation. Cc: Aditya Pakki Cc: David S. Miller Fixes: 5bf7295fe34a ("qlcnic: Avoid potential NULL pointer dereference") Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index d8a3ecaed3fc..985cf8cb2ec0 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -1047,8 +1047,6 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) { skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE); - if (!skb) - break; qlcnic_create_loopback_buff(skb->data, adapter->mac_addr); skb_put(skb, QLCNIC_ILB_PKT_SIZE); adapter->ahw->diag_cnt = 0; -- 2.31.1