Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-misc-next-fixes-2019-01-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

Fixes for v4.21:
- Fix null pointer dereference on null state pointer.
- Fix leaking damage clip when destroying plane state.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/46c4dbcd-dc23-7b46-fda9-16fe33e6ceef@linux.intel.com

+5 -1
+3
drivers/gpu/drm/drm_atomic_state_helper.c
··· 241 241 242 242 state->fence = NULL; 243 243 state->commit = NULL; 244 + state->fb_damage_clips = NULL; 244 245 } 245 246 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); 246 247 ··· 286 285 287 286 if (state->commit) 288 287 drm_crtc_commit_put(state->commit); 288 + 289 + drm_property_blob_put(state->fb_damage_clips); 289 290 } 290 291 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state); 291 292
+2 -1
drivers/gpu/drm/drm_damage_helper.c
··· 178 178 state = drm_atomic_state_alloc(fb->dev); 179 179 if (!state) { 180 180 ret = -ENOMEM; 181 - goto out; 181 + goto out_drop_locks; 182 182 } 183 183 state->acquire_ctx = &ctx; 184 184 ··· 238 238 kfree(rects); 239 239 drm_atomic_state_put(state); 240 240 241 + out_drop_locks: 241 242 drm_modeset_drop_locks(&ctx); 242 243 drm_modeset_acquire_fini(&ctx); 243 244