Patch "RDMA/mlx5: Add missing check for return value in get namespace flow" has been added to the 5.18-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

    RDMA/mlx5: Add missing check for return value in get namespace flow

to the 5.18-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:
     rdma-mlx5-add-missing-check-for-return-value-in-get-.patch
and it can be found in the queue-5.18 subdirectory.

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



commit ac54a617fb3fd02ab385387140b05c0cc0c5278f
Author: Maor Gottlieb <maorg@xxxxxxxxxx>
Date:   Sun Jul 31 11:29:08 2022 +0300

    RDMA/mlx5: Add missing check for return value in get namespace flow
    
    [ Upstream commit c9776457bd5eaad4ce4ecb17af8d8f3cc6957c0b ]
    
    Add missing check for return value when calling to
    mlx5_ib_ft_type_to_namespace, even though it can't really fail in this
    specific call.
    
    Fixes: 52438be44112 ("RDMA/mlx5: Allow inserting a steering rule to the FDB")
    Link: https://lore.kernel.org/r/7b9ceda217d9368a51dc47a46b769bad4af9ac92.1659256069.git.leonro@xxxxxxxxxx
    Reviewed-by: Itay Aveksis <itayav@xxxxxxxxxx>
    Signed-off-by: Maor Gottlieb <maorg@xxxxxxxxxx>
    Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 661ed2b44508..6092118de672 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -2265,12 +2265,10 @@ static int mlx5_ib_matcher_ns(struct uverbs_attr_bundle *attrs,
 		if (err)
 			return err;
 
-		if (flags) {
-			mlx5_ib_ft_type_to_namespace(
+		if (flags)
+			return mlx5_ib_ft_type_to_namespace(
 				MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX,
 				&obj->ns_type);
-			return 0;
-		}
 	}
 
 	obj->ns_type = MLX5_FLOW_NAMESPACE_BYPASS;



[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