Re: [PATCH RESEND] drm/ast: Allocate initial CRTC state of the correct size

2020-01-29 Thread Daniel Vetter
On Wed, Jan 29, 2020 at 1:31 PM Thomas Zimmermann wrote: > > The ast driver inherits from DRM's CRTC state, but still uses the atomic > helper for struct drm_crtc_funcs.reset, drm_atomic_helper_crtc_reset(). > > The helper only allocates enough memory for the core CRTC state. That > results in an

[PATCH RESEND] drm/ast: Allocate initial CRTC state of the correct size

2020-01-29 Thread Thomas Zimmermann
The ast driver inherits from DRM's CRTC state, but still uses the atomic helper for struct drm_crtc_funcs.reset, drm_atomic_helper_crtc_reset(). The helper only allocates enough memory for the core CRTC state. That results in an out-ouf-bounds access when duplicating the initial CRTC state. Simpli