[PATCH] drm: qxl: add missing return check

2017-03-14 Thread Dan Carpenter
My static checker complains that "release" is uninitialized if qxl_alloc_release_reserved() fails, so let's add a check for that. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 9548bb58d3bc..058340a002c2 100644 --- a/drivers

Re: [PATCH] drm: qxl: add missing return check

2017-03-14 Thread Gerd Hoffmann
On Di, 2017-03-14 at 10:54 +0300, Dan Carpenter wrote: > My static checker complains that "release" is uninitialized if > qxl_alloc_release_reserved() fails, so let's add a check for that. applied to drm-misc-next. thanks, Gerd ___ Virtualization mai

[PATCH] drm: virtio: fix eno.cocci warnings

2017-03-14 Thread kbuild test robot
drivers/gpu/drm/virtio/virtgpu_vq.c:100:5-11: ERROR: allocation function on line 99 returns NULL not ERR_PTR on failure The various basic memory allocation functions don't return ERR_PTR Generated by: scripts/coccinelle/null/eno.cocci Signed-off-by: Fengguang Wu --- virtgpu_vq.c |2 +-

Re: [PATCH] drm: virtio: fix eno.cocci warnings

2017-03-14 Thread Gerd Hoffmann
Hi, > vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL); > - if (IS_ERR(vbuf)) > + if (!vbuf) > return ERR_CAST(vbuf); Well, ERR_CAST(vbuf) isn't correct either ... correct fix has been committed to drm-misc-next today and should show up in linux-next shortly. chee

[PATCH-v5 0/4] vsock: cancel connect packets when failing to connect

2017-03-14 Thread Peng Tao
Currently, if a connect call fails on a signal or timeout (e.g., guest is still in the process of starting up), we'll just return to caller and leave the connect packet queued and they are sent even though the connection is considered a failure, which can confuse applications with unwanted false

[PATCH-v5 1/4] vsock: track pkt owner vsock

2017-03-14 Thread Peng Tao
So that we can cancel a queued pkt later if necessary. Signed-off-by: Peng Tao --- include/linux/virtio_vsock.h| 3 +++ net/vmw_vsock/virtio_transport_common.c | 7 +++ 2 files changed, 10 insertions(+) diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h ind

[PATCH-v5 4/4] vsock: cancel packets when failing to connect

2017-03-14 Thread Peng Tao
Otherwise we'll leave the packets queued until releasing vsock device. E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest will get the connect requests from failed host sockets. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Peng Tao --- net/vmw_v

[PATCH-v5 3/4] vsock: add pkt cancel capability

2017-03-14 Thread Peng Tao
Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- net/vmw_vsock/virtio_transport.c | 42 1 file changed, 42 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 9d24c0e..bcab8f2 100644 --- a/net/vmw_

[PATCH-v5 2/4] vhost-vsock: add pkt cancel capability

2017-03-14 Thread Peng Tao
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Peng Tao --- drivers/vhost/vsock.c | 41 + include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vh