Skip to content
Snippets Groups Projects
Commit 4fa7b4cc authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

virtio-gpu: move scanout_id sanity check

Checking scanout_id in virtio_gpu_do_set_scanout() is too late, for the
"resource_id == 0" case (aka disable scanout) the scanout_id is used
unchecked.  Move the check into the callers to fix that.

Fixes: e64d4b6a ("virtio-gpu: Refactor virtio_gpu_set_scanout")
Fixes: 32db3c63 ("virtio-gpu: Add virtio_gpu_set_scanout_blob")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/383


Reported-by: default avatarAlexander Bulekov <alxndr@bu.edu>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: default avatarLi Qiang <liq3ea@gmail.com>
Message-Id: <20210604075029.1201478-1-kraxel@redhat.com>
parent 25b2ef2e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment