IB/mlx5: Fix error handling in UVERBS_HANDLER
A message that is not in the archive (sent off-list or not yet received): 20181222081335.GA13088@embeddedor
Quoted 9 lines · Gustavo A. R. Silva
Currently, if
uverbs_attr_ptr_get_array_size()fails, the returned error turns into a huge value, once it is being store into a variable of typesize_t(unsigned long), hence never actually reporting such error and causing unexpected behavior when executing functionmlx5_ib_create_modify_header().Fix this by changing the type of variable
num_actionsfromsize_tto int.
Quoted 6 lines
Addresses-Coverity-ID: 1475957 ("Unsigned compared against 0")
Fixes cbfdd442c43e ("IB/uverbs: Add helper to get array size from ptr attribute")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/infiniband/hw/mlx5/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks for fixing it, but I see that Dam already sent fix for that.