qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] virtio-net: check the existence of peer before accesing its


From: Jason Wang
Subject: Re: [PATCH] virtio-net: check the existence of peer before accesing its config
Date: Mon, 27 Jul 2020 16:51:53 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0


On 2020/7/27 下午4:44, Cornelia Huck wrote:
On Mon, 27 Jul 2020 15:43:28 +0800
Jason Wang <jasowang@redhat.com> wrote:

typo in subject: s/accesing/accessing/

We try to get config from peer unconditionally which may lead NULL
s/lead/lead to a/

pointer dereference. Add a check before trying to access the config.

Fixes: 108a64818e69b ("vhost-vdpa: introduce vhost-vdpa backend")
Cc: Cindy Lu <lulu@redhat.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
  hw/net/virtio-net.c | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>


Applied with the above fixed.

Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]