linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] IB/mlx5: Fix error handling in UVERBS_HANDLER
       [not found] <20181222081335.GA13088@embeddedor>
@ 2018-12-22  8:41 ` Leon Romanovsky
  0 siblings, 0 replies; only message in thread
From: Leon Romanovsky @ 2018-12-22  8:41 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Moni Shoua, Doug Ledford, Jason Gunthorpe, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-22 17:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181222081335.GA13088@embeddedor>
2018-12-22  8:41 ` [PATCH] IB/mlx5: Fix error handling in UVERBS_HANDLER Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).