Skip to content

Commit

Permalink
Revert "net: liquidio: fix a NULL pointer dereference"
Browse files Browse the repository at this point in the history
[ Upstream commit 4fd798a ]

This reverts commit fe543b2.

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>
  • Loading branch information
gregkh committed Jun 3, 2021
1 parent de1fe32 commit 727041e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/ethernet/cavium/liquidio/lio_main.c
Expand Up @@ -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;

Expand Down

0 comments on commit 727041e

Please sign in to comment.