mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Moni Shoua <monis@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/mlx5: Fix error handling in UVERBS_HANDLER
Date: Sat, 22 Dec 2018 10:41:23 +0200	[thread overview]
Message-ID: <20181222084123.GJ3940@mtr-leonro.mtl.com> (raw)
In-Reply-To: <20181222081335.GA13088@embeddedor>

[-- 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 --]

           reply	other threads:[~2018-12-22 17:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20181222081335.GA13088@embeddedor>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181222084123.GJ3940@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=gustavo@embeddedor.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®