On Wed, Apr 21, 2021 at 2:58 PM Dave Airlie airlied@gmail.com wrote:
Looking at the umn.edu patches for drm in the last while, all the refcount ones look bogus,
2020-06-13 20:48 -0500 Aditya Pakki o drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek 2020-06-13 20:22 -0500 Aditya Pakki o drm/nouveau: Fix reference count leak in nouveau_connector_detect 2020-06-13 20:29 -0500 Aditya Pakki o drm/nouveau: fix reference count leak in nv50_disp_atomic_commit 2020-06-13 20:41 -0500 Aditya Pakki o drm/nouveau: fix multiple instances of reference count leaks 2020-06-13 20:33 -0500 Aditya Pakki o drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open 2020-06-13 21:21 -0500 Aditya Pakki │ o drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync 2020-06-13 20:55 -0500 Aditya Pakki │ │ o drm/radeon: fix multiple reference count leak
For these two, I don't think there's any harm to them. Other drivers in the kernel seem to be inconsistent with respect to checking the return value of pm_runtime_get_sync(). The documentation says that the function increments the use count even if the function returns an error, so we should in theory be decrementing it again if it fails. It's not clear what the recommended handling of this case is in the runtime pm documentation. If the resume failed do you want to leave the device active, or attempt to suspend it again to save power? Beyond that, checking the return value of this function has since spread elsewhere in the driver where we call pm_runtime_get_sync() so removing all of that will be a bigger task.
2020-06-13 14:32 -0500 Qiushi Wu │ │ │ o drm/amdkfd: Fix reference count leaks.
+ Felix
Felix took a look at this and thought it was still a legitimate fix.
Alex
These ones look sane but maybe we should revert them all anyways.
2019-12-15 13:43 -0600 Aditya Pakki │ │ │ │ o drm: remove duplicate check on parent and avoid BUG_ON 2019-10-17 23:41 -0500 Kangjie Lu │ │ │ │ │ o drm/gma500: fix memory disclosures due to uninitialized bytes 2019-10-17 23:29 -0500 Kangjie Lu │ │ │ │ │ o gma/gma500: fix a memory disclosure bug due to uninitialized bytes 2019-03-24 18:16 -0500 Kangjie Lu │ │ │ │ │ │ o drm/v3d: fix a missing check of pm_runtime_get_sync 2019-03-08 22:36 -0600 Kangjie Lu │ │ │ │ │ │ │ o drm: vkms: check status of alloc_ordered_workqueue
Ben, Alex can you line up reverts for next for all of the nouveau/amdgpu/radeon ones?
Dave.