linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Alex Dewar <alex.dewar90@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Parav Pandit <parav@mellanox.com>, Eli Cohen <eli@mellanox.com>,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vdpa/mlx5: Fix erroneous null pointer checks
Date: Fri, 7 Aug 2020 11:59:29 +0800	[thread overview]
Message-ID: <59bf7e04-a834-2728-dd2a-a2cd62a724a8@redhat.com> (raw)
In-Reply-To: <a1fb552a-bd5c-d7a2-7eae-d787cc61ec73@redhat.com>


On 2020/8/7 上午11:37, Jason Wang wrote:
>
> On 2020/8/7 上午3:18, Alex Dewar wrote:
>> In alloc_inout() in net/mlx5_vnet.c, there are a few places where memory
>> is allocated to *in and *out, but only the values of in and out are
>> null-checked (i.e. there is a missing dereference). Fix this.
>>
>> Addresses-Coverity: ("CID 1496603: (REVERSE_INULL)")
>> Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 
>> devices")
>> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
>
>
> Acked-by: Jason Wang <jasowang@redhat.com>


Colin posted something similar: [PATCH][next] vdpa/mlx5: fix memory 
allocation failure checks

And I think his fix is better since it prevent raw pointers to be freed.

Thanks


  reply	other threads:[~2020-08-07  3:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 19:18 [PATCH] vdpa/mlx5: Fix erroneous null pointer checks Alex Dewar
2020-08-07  3:37 ` Jason Wang
2020-08-07  3:59   ` Jason Wang [this message]
2020-08-09  5:52 ` Eli Cohen
2020-08-09  6:03   ` Eli Cohen
2020-08-09 16:21     ` Alex Dewar

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=59bf7e04-a834-2728-dd2a-a2cd62a724a8@redhat.com \
    --to=jasowang@redhat.com \
    --cc=alex.dewar90@gmail.com \
    --cc=eli@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=parav@mellanox.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).