Re: [PATCH] drm/virtio: Fix Smatch tool warnings in virtgpu_dma_buf_free_obj()

2025-01-09 Thread Dmitry Osipenko
On 12/12/24 08:54, Vivek Kasireddy wrote: > Fix the following issues identified by Smatch static checker: > - The call to dma_buf_put(attach->dmabuf) after dma_buf_detach() > leads to a UAF bug as dma_buf_detach() frees the attach object. > Fix this by extracting the dmabuf object from attach a

[PATCH] drm/virtio: Fix Smatch tool warnings in virtgpu_dma_buf_free_obj()

2024-12-11 Thread Vivek Kasireddy
Fix the following issues identified by Smatch static checker: - The call to dma_buf_put(attach->dmabuf) after dma_buf_detach() leads to a UAF bug as dma_buf_detach() frees the attach object. Fix this by extracting the dmabuf object from attach and using that in the call to dma_buf_put(). - T