video: tegra: host: use lock to get syncpt name
authorGagan Grover <ggrover@nvidia.com>
Tue, 22 Nov 2016 10:13:19 +0000 (15:13 +0530)
committerManish Tuteja <mtuteja@nvidia.com>
Wed, 1 Mar 2017 00:37:18 +0000 (16:37 -0800)
commit162d9cb7dd2f716327c935ca709c453c172ce3ca
tree0ccdc973fed15be42aa8b36c06350fcf27d82f1b
parent47e55811d1761cc086951fe600753b723ec7895f
video: tegra: host: use lock to get syncpt name

Use sp->syncpt_mutex lock to get syncpt name in
syncpt_name_show()
Without the lock, it is possible for user to read
syncpt name in corrupted state if user read
coincides with syncpt free

Bug 1838598
Bug 1858126

Change-Id: I69ca5c1d80adaca4b93a337fe4a5debeb78f34fc
Reviewed-on: http://git-master/r/1252580
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1258020
(cherry picked from commit 9a7d12e49ca6c627dff2dc4c15fa9ba153e9265d)
Reviewed-on: http://git-master/r/1270244
(cherry picked from commit bcfa618cda62fd56ee30676ed7ee62a7b0b942cd)
Reviewed-on: http://git-master/r/1311427
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
drivers/video/tegra/host/nvhost_syncpt.c