DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference
@ 2018-06-22  3:53 Tiwei Bie
  2018-06-22  7:24 ` Maxime Coquelin
  2018-06-23  6:51 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Tiwei Bie @ 2018-06-22  3:53 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, dev

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);
-- 
2.17.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference
  2018-06-22  3:53 [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference Tiwei Bie
@ 2018-06-22  7:24 ` Maxime Coquelin
  2018-06-23  6:51 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2018-06-22  7:24 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, dev



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference
  2018-06-22  3:53 [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference Tiwei Bie
  2018-06-22  7:24 ` Maxime Coquelin
@ 2018-06-23  6:51 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2018-06-23  6:51 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, dev



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(+)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-23  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22  3:53 [dpdk-dev] [PATCH] vhost: fix potential null pointer dereference Tiwei Bie
2018-06-22  7:24 ` Maxime Coquelin
2018-06-23  6:51 ` Maxime Coquelin

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).