Re: [PATCH -next v2] virtio: fix possible memory leak in virtqueue_add()

2016-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2016 at 02:16:31PM +, Wei Yongjun wrote: > 'desc' is malloced in virtqueue_add() and should be freed before > leaving from the error handling cases, otherwise it will cause > memory leak. > > Signed-off-by: Wei Yongjun Appliecd except I moved this to

[PATCH] virtio: fix error handling for debug builds

2016-08-02 Thread Michael S. Tsirkin
On error, virtqueue_add calls START_USE but not END_USE. Thankfully that's normally empty anyway, but might not be when debugging. Fix it up. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 0904/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Cornelia Huck
On Tue, 2 Aug 2016 19:56:46 +0800 Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission have had the >

[PATCH -next v2] virtio: fix possible memory leak in virtqueue_add()

2016-08-02 Thread Wei Yongjun
'desc' is malloced in virtqueue_add() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH 0904/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Christian Borntraeger
In general, I find sending 1285 patches to lkml unfriendly without doing a precheck if the general idea is good. This is especially true as you did NOT provide a cover letter that would allow to hide this thread on lkml. Regarding this particular patch, I do not really like this change, as I

Re: [PATCH -next] virtio: fix possible memory leak in virtqueue_add()

2016-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2016 at 01:59:05PM +, Wei Yongjun wrote: > desc may malloced in virtqueue_add() and should be freed before > leaving from the error handling cases, otherwise it will cause > memory leak. > > Signed-off-by: Wei Yongjun > --- > drivers/virtio/virtio_ring.c

Re: [PATCH -next] vhost: fix missing unlock on error in vhost_net_set_features()

2016-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2016 at 01:50:10PM +, Wei Yongjun wrote: > Add the missing unlock before return from function > vhost_net_set_features() in the error handling case. > > Fixes: eefe82d9b81f ('vhost: new device IOTLB API') > Signed-off-by: Wei Yongjun Thanks! I'll squash

Re: [PATCH -next] VSOCK: Use kvfree()

2016-08-02 Thread Michael S. Tsirkin
On Tue, Aug 02, 2016 at 01:50:42PM +, Wei Yongjun wrote: > Use kvfree() instead of open-coding it. > > Signed-off-by: Wei Yongjun Applied, thanks! > --- > drivers/vhost/vsock.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git

[PATCH -next] virtio: fix possible memory leak in virtqueue_add()

2016-08-02 Thread Wei Yongjun
desc may malloced in virtqueue_add() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun --- drivers/virtio/virtio_ring.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] drm/virtio: fix building without CONFIG_FBDEV

2016-08-02 Thread Daniel Vetter
On Tue, Aug 02, 2016 at 12:09:15PM +0200, Arnd Bergmann wrote: > Removing the build-time dependency on DRM_KMS_FB_HELPER means > we can now build with CONFIG_FB disabled or as a loadable module, > leading to a link error: > > ERROR: "remove_conflicting_framebuffers" >

[PATCH -next] VSOCK: Use kvfree()

2016-08-02 Thread Wei Yongjun
Use kvfree() instead of open-coding it. Signed-off-by: Wei Yongjun --- drivers/vhost/vsock.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 028ca16..0ddf3a2 100644 --- a/drivers/vhost/vsock.c +++

[PATCH -next] vhost: fix missing unlock on error in vhost_net_set_features()

2016-08-02 Thread Wei Yongjun
Add the missing unlock before return from function vhost_net_set_features() in the error handling case. Fixes: eefe82d9b81f ('vhost: new device IOTLB API') Signed-off-by: Wei Yongjun --- drivers/vhost/net.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-)

[PATCH 1024/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0992/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0991/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0904/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0214/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0213/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0753/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH 0095/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability

[PATCH] drm/virtio: fix building without CONFIG_FBDEV

2016-08-02 Thread Arnd Bergmann
Removing the build-time dependency on DRM_KMS_FB_HELPER means we can now build with CONFIG_FB disabled or as a loadable module, leading to a link error: ERROR: "remove_conflicting_framebuffers" [drivers/gpu/drm/virtio/virtio-gpu.ko] undefined! There is no need to call