On Wed, May 21, 2025 at 12:33:21PM -0300, André Almeida wrote: > When a device get wedged, it might be caused by a guilty application. > For userspace, knowing which task was the cause can be useful for some
s/cause/involved > situations, like for implementing a policy, logs or for giving a chance > for the compositor to let the user know what task caused the problem. Ditto > This is an optional argument, when the task info is not available, the > PID and TASK string won't appear in the event string. > > Sometimes just the PID isn't enough giving that the task might be already > dead by the time userspace will try to check what was this PID's name, > so to make the life easier also notify what's the task's name in the user > event. ... > -int drm_dev_wedged_event(struct drm_device *dev, unsigned long method) > +int drm_dev_wedged_event(struct drm_device *dev, unsigned long method, > + struct drm_wedge_task_info *info) > { > const char *recovery = NULL; > unsigned int len, opt; > - /* Event string length up to 28+ characters with available methods */ > - char event_string[32]; > - char *envp[] = { event_string, NULL }; > + char event_string[WEDGE_STR_LEN], pid_string[PID_LEN] = "", > comm_string[TASK_COMM_LEN] = ""; Most likely there's no need to initialize these. With above changes, Reviewed-by: Raag Jadav <raag.ja...@intel.com>