diff options
author | Xie Yongji <xieyongji@bytedance.com> | 2021-05-17 16:49:12 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:15:59 +0200 |
commit | 2fda4ff855d8be14338cc383fad3f2fa2f7d30aa (patch) | |
tree | e4a26b0ae32d34c69b45ae82b775ab716621e409 /fs | |
parent | 47b4b8f0d3780959a15e0118da83c42c688d14e6 (diff) | |
download | linux-stable-2fda4ff855d8be14338cc383fad3f2fa2f7d30aa.tar.gz linux-stable-2fda4ff855d8be14338cc383fad3f2fa2f7d30aa.tar.bz2 linux-stable-2fda4ff855d8be14338cc383fad3f2fa2f7d30aa.zip |
drm/virtio: Fix double free on probe failure
[ Upstream commit cec7f1774605a5ef47c134af62afe7c75c30b0ee ]
The virtio_gpu_init() will free vgdev and vgdev->vbufs on failure.
But such failure will be caught by virtio_gpu_probe() and then
virtio_gpu_release() will be called to do some cleanup which
will free vgdev and vgdev->vbufs again. So let's set dev->dev_private
to NULL to avoid double free.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-2-xieyongji@bytedance.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions