]> Git Repo - linux.git/commitdiff
RDMA/mlx5: Signedness bug in UVERBS_HANDLER()
authorDan Carpenter <[email protected]>
Sat, 22 Dec 2018 07:43:32 +0000 (10:43 +0300)
committerJason Gunthorpe <[email protected]>
Sat, 22 Dec 2018 23:07:13 +0000 (16:07 -0700)
The "num_actions" variable needs to be signed for the error handling to
work.  The maximum number of actions is less than 256 so int type is large
enough for that.

Fixes: cbfdd442c43e ("IB/uverbs: Add helper to get array size from ptr attribute")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
drivers/infiniband/hw/mlx5/flow.c

index 95cf4b9fc65dbecca01816654dfe0590ac1fc13e..e8a1e4498e3ff3147e9f8530cbc079b6ef7a4f43 100644 (file)
@@ -329,7 +329,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)(
        struct mlx5_ib_dev *mdev = to_mdev(uobj->context->device);
        enum mlx5_ib_uapi_flow_table_type ft_type;
        struct ib_flow_action *action;
-       size_t num_actions;
+       int num_actions;
        void *in;
        int ret;
 
This page took 0.059614 seconds and 4 git commands to generate.