Hi Dmitry

On 08/06/2026 21:40, Dmitry Osipenko wrote:
> Hi,
> 
> On 6/7/26 07:31, Ryosuke Yasuoka wrote:
>> Hi Dmitry
>> 
>> On 04/06/2026 15:27, Dmitry Osipenko wrote:
>>> DRM atomic and modesetting aren't initialized if virtio-gpu driver built
>>> with disabled KMS, leading to access of uninitialized data on driver
>>> removal/unbinding and crashing kernel. Fix it by skipping shutting down
>>> atomic core with unavailable KMS.
>>>
>>> Fixes: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
>>> Signed-off-by: Dmitry Osipenko <[email protected]>
>>> ---
>>>  drivers/gpu/drm/virtio/virtgpu_drv.c | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c 
>>> b/drivers/gpu/drm/virtio/virtgpu_drv.c
>>> index f0fb784c0f6f..2aaa7cb08085 100644
>>> --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
>>> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
>>> @@ -138,7 +138,10 @@ static void virtio_gpu_remove(struct virtio_device 
>>> *vdev)
>>>  
>>>     virtio_gpu_release_vqs(dev);
>>>     drm_dev_unplug(dev);
>>> -   drm_atomic_helper_shutdown(dev);
>>> +
>>> +   if (drm_core_check_feature(dev, DRIVER_ATOMIC))
>>> +           drm_atomic_helper_shutdown(dev);
>>> +
>>>     virtio_gpu_deinit(dev);
>>>     drm_dev_put(dev);
>>>  }
>> 
>> The patch looks good to me at a glance. I haven't done a full, deep code
>> review yet, but I've tested it on my lab and everything works as
>> expected.
>> 
>> Tested-by: Ryosuke Yasuoka <[email protected]>
> 
> Thanks a lot for the testing. The review from you will be very welcomed
> too.

I reviewed your patch and this change looks good to me.

Reviewed-by: Ryosuke Yasuoka <[email protected]>

Thank you!
Ryosuke


Reply via email to