Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit edeabfcb authored by Arto Merilainen's avatar Arto Merilainen Committed by Thierry Reding
Browse files

gpu: host1x: Fix memory access in syncpt request



This patch fixes a bad memory access in syncpoint request code. If
no syncpoints were available, the code accessed unreserved memory
area causing unexpected behaviour.

Signed-off-by: default avatarArto Merilainen <amerilainen@nvidia.com>
Acked-By: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 3364cd28
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -40,7 +40,8 @@ static struct host1x_syncpt *_host1x_syncpt_alloc(struct host1x *host,

	for (i = 0; i < host->info->nb_pts && sp->name; i++, sp++)
		;
	if (sp->dev)

	if (i >= host->info->nb_pts)
		return NULL;

	name = kasprintf(GFP_KERNEL, "%02d-%s", sp->id,