]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Check reloc table before usage
authorArto Merilainen <amerilainen@nvidia.com>
Wed, 29 May 2013 10:26:03 +0000 (13:26 +0300)
committerThierry Reding <thierry.reding@gmail.com>
Sat, 22 Jun 2013 10:43:52 +0000 (12:43 +0200)
commit4c90a20d801b49f11eef01bec37ec9587ded6099
tree8a8234fd8eb8798c72b5f3493237a9a2ec435b15
parent84349d8598c1b6e53674eed8e98fa5c5feef720a
gpu: host1x: Check reloc table before usage

The firewall assumed that the user space always delivers a relocation
table when it is accessing address registers. If userspace did not
deliver a relocation table and tried to access the address registers,
the code performed bad memory accesses.

This patch modifies the firewall to check correctly that the firewall
table is available before accessing it. In addition, check_reloc() is
converted to use boolean return value (true when the reloc is valid,
false when invalid).

Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/gpu/host1x/job.c