Patch "net/mlx5: Geneve, Fix handling of Geneve object id as error code" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5: Geneve, Fix handling of Geneve object id as error code

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5-geneve-fix-handling-of-geneve-object-id-as-.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9367ec911fd5b3bbc4027854078ad9af3a7406af
Author: Maor Dickman <maord@xxxxxxxxxx>
Date:   Wed Feb 8 17:44:06 2023 +0200

    net/mlx5: Geneve, Fix handling of Geneve object id as error code
    
    [ Upstream commit d28a06d7dbedc598a06bd1e53a28125f87ca5d0c ]
    
    On success, mlx5_geneve_tlv_option_create returns non negative
    Geneve object id. In case the object id is positive value the
    caller functions will handle it as an error (non zero) and
    will fail to offload the Geneve rule.
    
    Fix this by changing caller function ,mlx5_geneve_tlv_option_add,
    to return 0 in case valid non negative object id was provided.
    
    Fixes: 0ccc171ea6a2 ("net/mlx5: Geneve, Manage Geneve TLV options")
    Signed-off-by: Maor Dickman <maord@xxxxxxxxxx>
    Reviewed-by: Raed Salem <raeds@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/geneve.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/geneve.c
index 23361a9ae4fa0..6dc83e871cd76 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/geneve.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/geneve.c
@@ -105,6 +105,7 @@ int mlx5_geneve_tlv_option_add(struct mlx5_geneve *geneve, struct geneve_opt *op
 		geneve->opt_type = opt->type;
 		geneve->obj_id = res;
 		geneve->refcount++;
+		res = 0;
 	}
 
 unlock:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux