lkml.org 
[lkml]   [2018]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2018-12-22 18:48    [W:0.026 / U:8.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site