Re: [PATCH] drm/plane: Move range check for format_count earlier

2022-04-28 Thread Liviu Dudau
On Thu, Apr 28, 2022 at 12:57:52PM +0100, Steven Price wrote: > On 03/12/2021 13:08, Liviu Dudau wrote: > > On Fri, Dec 03, 2021 at 10:28:15AM +, Steven Price wrote: > >> While the check for format_count > 64 in __drm_universal_plane_init() > >> shouldn't be hit (it's a WARN_ON), in its current

Re: [PATCH] drm/plane: Move range check for format_count earlier

2022-04-28 Thread Steven Price
On 03/12/2021 13:08, Liviu Dudau wrote: > On Fri, Dec 03, 2021 at 10:28:15AM +, Steven Price wrote: >> While the check for format_count > 64 in __drm_universal_plane_init() >> shouldn't be hit (it's a WARN_ON), in its current position it will then >> leak the plane->format_types array and fail

Re: [PATCH] drm/plane: Move range check for format_count earlier

2021-12-03 Thread Carsten Haitzler
On 12/3/21 13:08, Liviu Dudau wrote: On Fri, Dec 03, 2021 at 10:28:15AM +, Steven Price wrote: While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call drm

Re: [PATCH] drm/plane: Move range check for format_count earlier

2021-12-03 Thread Liviu Dudau
On Fri, Dec 03, 2021 at 10:28:15AM +, Steven Price wrote: > While the check for format_count > 64 in __drm_universal_plane_init() > shouldn't be hit (it's a WARN_ON), in its current position it will then > leak the plane->format_types array and fail to call > drm_mode_object_unregister() leakin

[PATCH] drm/plane: Move range check for format_count earlier

2021-12-03 Thread Steven Price
While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call drm_mode_object_unregister() leaking the modeset identifier. Move it to the start of the function to avoi