Commit 41167b93 authored by Xie Yongji's avatar Xie Yongji Committed by wubinfeng
Browse files

drm/virtio: Fixes a potential NULL pointer dereference on probe failure

mainline inclusion
from mainline-v5.13-rc2
commit 17f46f48
category: bugfix
bugzilla: https://gitee.com/openeuler/stratovirt/issues/I66GGJ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.15&id=17f46f488a5d82c5568e6e786cd760bba1c2ee09



--------------------------------

The dev->dev_private might not be allocated if virtio_gpu_pci_quirk()
or virtio_gpu_init() failed. In this case, we should avoid the cleanup
in virtio_gpu_release().

Signed-off-by: default avatarXie Yongji <xieyongji@bytedance.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-1-xieyongji@bytedance.com


Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarBinfeng Wu <wubinfeng@huawei.com>
parent 97e7a7b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment