linux/drivers/gpu/drm/virtio
liuyuntao 5bd4f20de8 virtio-gpu: fix possible memory allocation failure
When kmem_cache_zalloc in virtio_gpu_get_vbuf fails, it will return
an error code. But none of its callers checks this error code, and
a core dump will take place.

Considering many of its callers can't handle such error, I add
a __GFP_NOFAIL flag when calling kmem_cache_zalloc to make sure
it won't fail, and delete those unused error handlings.

Fixes: dc5698e80c ("Add virtio gpu driver.")
Signed-off-by: Yuntao Liu <liuyuntao10@huawei.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210828104321.3410312-1-liuyuntao10@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-09-17 07:41:08 +02:00
..
Kconfig drivers: gpu: drm: virtio: fix dependency of DRM_VIRTIO_GPU on VIRTIO 2020-12-22 13:43:29 +01:00
Makefile
virtgpu_debugfs.c drm/virtio: virtio_{blah} --> virtio_gpu_{blah} 2020-12-02 11:48:14 +01:00
virtgpu_display.c
virtgpu_drv.c drm/aperture: Pass DRM driver structure instead of driver name 2021-07-01 11:11:55 +02:00
virtgpu_drv.h drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00
virtgpu_fence.c drm/virtio: consider dma-fence context when signaling 2020-12-02 11:48:14 +01:00
virtgpu_gem.c drm/virtio: Create Dumb BOs as guest Blobs (v3) 2021-04-15 10:55:18 +02:00
virtgpu_ioctl.c dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
virtgpu_kms.c drm/virtio: Fix double free on probe failure 2021-05-18 10:55:30 +02:00
virtgpu_object.c drm/virtio: Create Dumb BOs as guest Blobs (v3) 2021-04-15 10:55:18 +02:00
virtgpu_plane.c drm/virtio: Add the fence in resource_flush if present 2021-06-23 12:12:00 +02:00
virtgpu_prime.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00
virtgpu_trace.h
virtgpu_trace_points.c
virtgpu_vq.c virtio-gpu: fix possible memory allocation failure 2021-09-17 07:41:08 +02:00
virtgpu_vram.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00