From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>, zhihong.wang@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference
Date: Fri, 22 Jun 2018 09:24:09 +0200 [thread overview]
Message-ID: <f323f1cd-45c7-f7f5-5505-4bfa3c8d8816@redhat.com> (raw)
In-Reply-To: <20180622035305.28412-1-tiwei.bie@intel.com>
On 06/22/2018 05:53 AM, Tiwei Bie wrote:
> Coverity issue: 293097
> Fixes: d90cf7d111ac ("vhost: support host notifier")
>
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
> lib/librte_vhost/vhost_user.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 26cfebec0..bea6a0428 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -1830,6 +1830,8 @@ int vhost_user_host_notifier_ctrl(int vid, bool enable)
> return -ENOTSUP;
>
> vdpa_dev = rte_vdpa_get_device(did);
> + if (!vdpa_dev)
> + return -ENODEV;
>
> RTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_vfio_device_fd, -ENOTSUP);
> RTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_notify_area, -ENOTSUP);
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
next prev parent reply other threads:[~2018-06-22 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 3:53 Tiwei Bie
2018-06-22 7:24 ` Maxime Coquelin [this message]
2018-06-23 6:51 ` Maxime Coquelin
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=f323f1cd-45c7-f7f5-5505-4bfa3c8d8816@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=zhihong.wang@intel.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;
as well as URLs for NNTP newsgroup(s).