{{ message }}
Repository navigation
Fix plane allocation leak during device teardown - #599
Open
geraldo-netto wants to merge 1 commit into
Open
geraldo-netto wants to merge 1 commit into
geraldo-netto wants to merge 1 commit into
Conversation
drm_plane_cleanup releases state and registration, but leaves the containing allocation to the driver. Free it in the plane destroy callback. Add a native KUnit free-observation regression with valid query controls and 130 invalid/out-of-range plane-ID queries before teardown. Signed-off-by: Geraldo Netto <geraldonetto@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

EVDI allocates primary/cursor plane structures with kmalloc, but its destroy callback only runs drm_plane_cleanup, which leaves the containing allocation to the driver. Device teardown therefore leaks both plane allocations. Run DRM cleanup and then kfree in the driver callback.
The KUnit regression observes native frees through the real EVDI device lifecycle, with valid query controls and 130 invalid/out-of-range plane-ID queries through DRM_IOCTL_MODE_GETPLANE before teardown. Probe identities retire before address reuse; unregister synchronization fences context release. The test fails on current main and passes with this fix.
Validation:
The template's downloading CI scripts were not run; the installed offline build/style equivalents above were used. The full historical kernel matrix, SonarQube complexity measurement and physical host rollout are not validated here. The production callback is straight-line cleanup. The update-ready handshake is unchanged.