netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kangjie Lu <kjlu@umn.edu>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.12 39/63] Revert "net: liquidio: fix a NULL pointer dereference"
Date: Mon, 24 May 2021 10:45:56 -0400	[thread overview]
Message-ID: <20210524144620.2497249-39-sashal@kernel.org> (raw)
In-Reply-To: <20210524144620.2497249-1-sashal@kernel.org>

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

[ 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 <kjlu@umn.edu>
Cc: David S. Miller <davem@davemloft.net>
Link: https://lore.kernel.org/r/20210503115736.2104747-65-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 7c5af4beedc6..6fa570068648 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1166,11 +1166,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


  parent reply	other threads:[~2021-05-24 14:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210524144620.2497249-1-sashal@kernel.org>
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 08/63] Revert "net: fujitsu: fix a potential NULL pointer dereference" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 09/63] net: fujitsu: fix potential null-ptr-deref Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 10/63] Revert "net/smc: fix a NULL pointer dereference" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 11/63] net/smc: properly handle workqueue allocation failure Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 12/63] Revert "net: caif: replace BUG_ON with recovery code" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 13/63] net: caif: remove BUG_ON(dev == NULL) in caif_xmit Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 19/63] Revert "isdn: mISDNinfineon: fix potential NULL pointer dereference" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 20/63] isdn: mISDNinfineon: check/cleanup ioremap failure correctly in setup_io Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 21/63] Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 22/63] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd() Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 23/63] Revert "isdn: mISDN: Fix potential NULL pointer dereference of kzalloc" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 24/63] isdn: mISDN: correctly handle ph_info allocation failure in hfcsusb_ph_info Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 27/63] Revert "libertas: add checks for the return value of sysfs_create_group" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 28/63] libertas: register sysfs groups properly Sasha Levin
2021-05-24 14:45 ` Sasha Levin [this message]
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 40/63] net: liquidio: Add missing null pointer checks Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 41/63] Revert "brcmfmac: add a check for the status of usb_register" Sasha Levin
2021-05-24 14:45 ` [PATCH AUTOSEL 5.12 42/63] brcmfmac: properly check for bus register errors Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524144620.2497249-39-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).