]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit5060d8ec7cfc29dd399b4fe952ba96e7a88aa778
tree8a8234fd8eb8798c72b5f3493237a9a2ec435b15
parent64c173d3a2bb367c901f1f0a66c1d4e338d8cb2c
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