]> 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)
commitf404e3e5ac344d4273c2b80e5f5aa68aa96eb4c3
tree8a8234fd8eb8798c72b5f3493237a9a2ec435b15
parent0f35752730303abe1d8fbd9f47234ccda0fdb3dc
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