提交 edeabfcb 编写于 作者: A Arto Merilainen 提交者: Thierry Reding

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: NArto Merilainen <amerilainen@nvidia.com>
Acked-By: NTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 3364cd28
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册