Messages in this thread |  | | Date | Sat, 22 Dec 2018 10:41:23 +0200 | From | Leon Romanovsky <> | Subject | Re: [PATCH] IB/mlx5: Fix error handling in UVERBS_HANDLER |
| |
On Sat, Dec 22, 2018 at 02:13:35AM -0600, Gustavo A. R. Silva wrote: > 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 type > size_t (unsigned long), hence never actually reporting such error and > causing unexpected behavior when executing function > mlx5_ib_create_modify_header(). > > Fix this by changing the type of variable num_actions from size_t to > int. > > 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 <gustavo@embeddedor.com> > --- > 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. [unhandled content-type:application/pgp-signature] |  |