lkml.org 
[lkml]   [2021]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 36/52] Revert "net: liquidio: fix a NULL pointer dereference"
    Date
    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 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
    \
     
     \ /
      Last update: 2021-05-24 17:31    [W:2.792 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site