lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 11/90] net/mlx5: Fix command entry leak in Internal Error State
    Date
    From: Moshe Shemesh <moshe@mellanox.com>

    [ Upstream commit cece6f432cca9f18900463ed01b97a152a03600a ]

    Processing commands by cmd_work_handler() while already in Internal
    Error State will result in entry leak, since the handler process force
    completion without doorbell. Forced completion doesn't release the entry
    and event completion will never arrive, so entry should be released.

    Fixes: 73dd3a4839c1 ("net/mlx5: Avoid using pending command interface slots")
    Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
    Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++
    1 file changed, 4 insertions(+)

    --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
    +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
    @@ -847,6 +847,10 @@ static void cmd_work_handler(struct work
    MLX5_SET(mbox_out, ent->out, syndrome, drv_synd);

    mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true);
    + /* no doorbell, no need to keep the entry */
    + free_ent(cmd, ent->idx);
    + if (ent->callback)
    + free_cmd(ent);
    return;
    }


    \
     
     \ /
      Last update: 2020-05-18 19:42    [W:7.545 / U:0.468 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site