Skip to contentSkip to conversation

drm/atomic: free state in atomic ioctl if atomic commit failed

PATCH In review Liu, Hong 2 participants 3 messages Jun 25, 2015 – Jun 26, 2015

Subsystems (2)
lore
Share & tools
lore

Liu, Hong

author
#0 lore raw

PATCH 1/1 drm/atomic: free state in atomic ioctl if atomic commit failed

atomic commit only frees the state if no error met, caller needs to free the allocated state if atomic commit failed.

---
 drivers/gpu/drm/drm_atomic.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_atomic.c +3 -0
index 6e3b78e..aa8ad4c 100644
@@ -1344,6 +1344,9 @@ retry:
 		}
 	}
 
+	if (ret && !(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY))
+		goto fail;
+
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
 
Signature · 5 lines
1.7.9.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Hey,

Op 25-06-15 om 11:25 schreef Liu, Hong:

Quoted 13 lines

atomic commit only frees the state if no error met, caller needs to free the allocated state if atomic commit failed.

---
 drivers/gpu/drm/drm_atomic.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_atomic.c +0 -0
index 6e3b78e..aa8ad4c 100644

drivers/gpu/drm/drm_atomic.c retry: · line 1351

Quoted 8 lines
drivers/gpu/drm/drm_atomic.c +3 -0
@@ -1344,6 +1344,9 @@ retry:
 		}
 	}
 
+	if (ret && !(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY))
+		goto fail;
+
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);

"[PATCH 2/2] drm/atomic: Cleanup on error properly in the atomic ioctl." fixes it too.

~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#2 lore raw
Quoted 20 lines · Maarten Lankhorst

Hey,

Op 25-06-15 om 11:25 schreef Liu, Hong:

Quoted 17 lines

atomic commit only frees the state if no error met, caller needs to free the allocated state if atomic commit failed.

---
 drivers/gpu/drm/drm_atomic.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_atomic.c +0 -0
index 6e3b78e..aa8ad4c 100644
@@ -1344,6 +1344,9 @@ retry:
 		}
 	}
 
Quoted 7 lines

drivers/gpu/drm/drm_atomic.c retry: · line 1351

Quoted 5 lines
drivers/gpu/drm/drm_atomic.c +3 -0
+	if (ret && !(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY))
+		goto fail;
+
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);

"[PATCH 2/2] drm/atomic: Cleanup on error properly in the atomic ioctl." fixes it too.

I didn't notice the patch, thanks for the reminder.

Thanks,
Hong

Quoted 2 lines

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx