]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/mlx5: Signedness bug in UVERBS_HANDLER()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Dec 2018 07:43:32 +0000 (10:43 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 22 Dec 2018 23:07:13 +0000 (16:07 -0700)
commit58f7c0bfb4e111006ba376df7ab266a6d42d64ba
treebd333e4e0e60ceef79460e705a3c482914876904
parent573671a5f6509c4139770452d4516720a84d5b61
RDMA/mlx5: Signedness bug in UVERBS_HANDLER()

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 <dan.carpenter@oracle.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/flow.c