Thread (24 messages) 24 messages, 5 authors, 2024-02-16

Re: [PATCH v2 6/6] drm: add drm_mode_atomic_commit event

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-02-16 16:42:38
Also in: amd-gfx, dri-devel, linux-media

On Fri, 16 Feb 2024 17:37:23 +0100
Daniel Vetter [off-list ref] wrote:
quoted
quoted
@@ -1503,6 +1504,24 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
 		drm_mode_object_put(obj);
 	}
 
+	if (trace_drm_mode_atomic_commit_enabled()) {
+		struct drm_crtc_state *crtc_state;
+		struct drm_crtc *crtc;
+		int *crtcs;
+		int i, num_crtcs;
+
+		crtcs = kcalloc(dev->mode_config.num_crtc, sizeof(int),
+				GFP_KERNEL);  
If the above allocation fails, this will cause a NULL kernel dereference.  
Yeah can't we somehow iterate directly into the trace subsystem? If
nothing else works I guess just a per-crtc event should do.
You mean like this?

  https://lore.kernel.org/all/20240216105934.7b81eae9@gandalf.local.home/ (local)

;-)

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help