Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2707300pxj; Mon, 31 May 2021 08:44:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPEIbCIokzTLZ4uaW5pUx3I1/KsFTVmuv3E+mjYG1ToBBLd1c9b7Df9scuuedQX7mHiYq4 X-Received: by 2002:a02:ac82:: with SMTP id x2mr3121779jan.53.1622475862248; Mon, 31 May 2021 08:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475862; cv=none; d=google.com; s=arc-20160816; b=sR/2IlMMfsABbz19PWNiTozcgmea/cUvZEG7aUbs2YB5p087KOROE7iTWxnJ+bChdq UgK+US0miNrj/lTyyF0c+y8mEjRP9WELgaw/cMwZ4W2TiBLTFLqbZ3isA7mhPJvmiadK oKt3V1NqvXN9pkRMQcozzj/u3urRke6c24Y62tntp8mUmESB4LmqH3otBitn05g3bkUx hI6x8aOVMgTloOB7YT+5AhMlq7A2jxn3MqSGCaHSjmBQ39sNVSYG3uAvlP8fY8xDd01m BZHpDfHy6AQzHUhjz/1Zwlfca3iCqXuC3gm9MNOYEshstZXYGJ3vZUrp7SDrWw/TJ3dt 8Zxg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GIBfXkqhYmLy92lZ+ePkQbbxL2cN40N6BFF1vhOI6EE=; b=RPCeS5WnNXqWX8HjI+y7bMUVS4FL+LizwOmG/uzfPJdYu5l2Fvg9lzNcXczfzsR3zw Uy/TUV1ZueVEJ0aDD5pkmqJdDyxQsIDe3k35sIBL6tH1e/WaA7J087AX/o+W8YdCHDxk wcAWB3JfDxSWkBXw5CDBahQdjrWMNYaFdIB1dx/Ds0dp7UBYfqUKeRNlRsn5c87sB2bq COBQCDQqIqXDhrIPVVR7KSi5td5DbqcfzBozhHyZ+ZgbFNNKL4djHHZU0Dspm6d5cdHR YS0Lle8srfLqfuEdyKuu/fuROxf/qru2tdPmZE5FRvan4NPNa9v8BJeFuWUm2PI6ZOsG EndQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fjArtL8c; 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 c7si14764409jap.0.2021.05.31.08.44.09; Mon, 31 May 2021 08:44:22 -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=fjArtL8c; 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 S232641AbhEaPnW (ORCPT + 99 others); Mon, 31 May 2021 11:43:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbhEaOYG (ORCPT ); Mon, 31 May 2021 10:24:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D331A61428; Mon, 31 May 2021 13:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468767; bh=W4hzXqoHG/3EjJjFlzLnc/9WzCpZO4RrGgLy7YdQrX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fjArtL8cRzgQ7b3JJFt9Wal95lp1SbGjRKsFNEmkBFHGCefJPAH8NQDzn7mwkJMwi fuOMCoROdKy8FFEDz+197WfCWtY7p9Vdm436I2S/rMSGYd2JQpupGXd9qRAGfzK954 HidsQxF4MjULukjQnfG1pnm+amoSyYK0NGOFHaU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 119/177] Revert "net: liquidio: fix a NULL pointer dereference" Date: Mon, 31 May 2021 15:14:36 +0200 Message-Id: <20210531130652.029137227@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman [ Upstream commit 4fd798a5a89114c1892574c50f2aebd49bc5b4f5 ] This reverts commit fe543b2f174f34a7a751aa08b334fe6b105c4569. 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. While the original commit does keep the immediate "NULL dereference" from happening, it does not properly propagate the error back to the callers, AND it does not fix this same identical issue in the drivers/net/ethernet/cavium/liquidio/lio_vf_main.c for some reason. Cc: Kangjie Lu Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-65-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 7f3b2e3b0868..f2d486583e2f 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -1192,11 +1192,6 @@ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop) sc = (struct octeon_soft_command *) octeon_alloc_soft_command(oct, OCTNET_CMD_SIZE, 16, 0); - if (!sc) { - netif_info(lio, rx_err, lio->netdev, - "Failed to allocate octeon_soft_command\n"); - return; - } ncmd = (union octnet_cmd *)sc->virtdptr; -- 2.30.2