Re: [Qemu-devel] [PATCH] net: virtio-net: initialise local 'netcfg' variable

2016-12-05 Thread P J P
Hello Jason, +-- On Mon, 5 Dec 2016, Jason Wang wrote --+ | See feature_sizes[] in virtio-net.c, we won't expose mtu to guest until MTU | feature were negotiated. Oh, it updates config size without the 'mtu' field during realise, okay. Still IMO having an initialiser({}) is better. But upto

Re: [Qemu-devel] [PATCH] net: virtio-net: initialise local 'netcfg' variable

2016-12-05 Thread Jason Wang
On 2016年12月05日 17:10, P J P wrote: Hello Jason, +-- On Mon, 5 Dec 2016, Jason Wang wrote --+ | > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c | > index 01f1351..cb5b3dc 100644 | > --- a/hw/net/virtio-net.c | > +++ b/hw/net/virtio-net.c | > @@ -72,7 +72,7 @@ static int vq2q(int que

Re: [Qemu-devel] [PATCH] net: virtio-net: initialise local 'netcfg' variable

2016-12-05 Thread P J P
Hello Jason, +-- On Mon, 5 Dec 2016, Jason Wang wrote --+ | > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c | > index 01f1351..cb5b3dc 100644 | > --- a/hw/net/virtio-net.c | > +++ b/hw/net/virtio-net.c | > @@ -72,7 +72,7 @@ static int vq2q(int queue_index) | > static void virtio_net_g

Re: [Qemu-devel] [PATCH] net: virtio-net: initialise local 'netcfg' variable

2016-12-04 Thread Jason Wang
On 2016年12月02日 19:28, P J P wrote: From: Prasad J Pandit Local 'netcfg' variable in 'virtio_net_get_config' routine was not initialised. It could leak uninitialised 'netcfg.mtu' field memory. Initialise 'netcfg' to avoid it. Reported-by: Azureyang Signed-off-by: Prasad J Pandit --- hw/ne

[Qemu-devel] [PATCH] net: virtio-net: initialise local 'netcfg' variable

2016-12-02 Thread P J P
From: Prasad J Pandit Local 'netcfg' variable in 'virtio_net_get_config' routine was not initialised. It could leak uninitialised 'netcfg.mtu' field memory. Initialise 'netcfg' to avoid it. Reported-by: Azureyang Signed-off-by: Prasad J Pandit --- hw/net/virtio-net.c | 2 +- 1 file changed, 1