OSDN Git Service

Revert "drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits"
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 10 Jan 2018 09:32:18 +0000 (10:32 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 10 Jan 2018 09:33:40 +0000 (10:33 +0100)
This reverts commit a10195bbe7f4e6ba540083ba13126ef745116cae.

This commit needs some more thought, and is currently crashing kms_flip
tests. Until we figure out what's going wrong it's better to revert, and
also next time apply it to drm-misc-fixes.

Testcase: kms_flip
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104566
References: https://patchwork.freedesktop.org/series/36185/
References: https://patchwork.freedesktop.org/series/36250/
Reported-by: Marta Löfstedt <marta.lofstedt@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/drm_atomic_helper.c

index 4253f57..ab40321 100644 (file)
@@ -3421,15 +3421,6 @@ EXPORT_SYMBOL(drm_atomic_helper_crtc_duplicate_state);
 void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state)
 {
        if (state->commit) {
-               /*
-                * In the event that a non-blocking commit returns
-                * -ERESTARTSYS before the commit_tail work is queued, we will
-                * have an extra reference to the commit object. Release it, if
-                * the event has not been consumed by the worker.
-                */
-               if (state->event)
-                       drm_crtc_commit_put(state->commit);
-
                kfree(state->commit->event);
                state->commit->event = NULL;
                drm_crtc_commit_put(state->commit);