[igt-dev] [PATCH i-g-t] tools/intel_gpu_top: fix segfault on discrete

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon May 29 14:34:06 UTC 2023


On 2023-05-29 at 14:44:50 +0300, Juha-Pekka Heikkila wrote:
> in case no display clients ignore display client list
> 
> Reported-by: Eero Tamminen <eero.t.tamminen at intel.com>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

+cc Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  tools/intel_gpu_top.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index a89f13d4..cef1d3c7 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -837,6 +837,9 @@ static struct igt_drm_clients *display_clients(struct igt_drm_clients *clients)
>  	struct igt_drm_clients *aggregated;
>  	int tmp, num = 0;
>  
> +	if (!clients)
> +		return NULL;
> +
>  	if (!aggregate_pids)
>  		goto out;
>  
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list