video: tegra: host: Fix race from acm
authorArto Merilainen <amerilainen@nvidia.com>
Thu, 2 May 2013 10:25:01 +0000 (13:25 +0300)
committerHarry Hong <hhong@nvidia.com>
Mon, 11 Nov 2013 00:29:10 +0000 (16:29 -0800)
commitece86d8f0aba63b178a4034b84ec791377cdbdf5
tree1ab5a2f0c44d979e8dc37ec780434387c34b643c
parentfa36a945612291d6ef362a5c7b4b10ad6ee3fb6d
video: tegra: host: Fix race from acm

The code did not take the client list mutex while setting a new
devfreq rate. However, the code utilised the list to determine
the required rate and therefore caused a race. This caused illegal
memory accesses if the client list was modified at the same time
the devfreq rate was set.

Bug 1375457

Change-Id: Ic4747e5c0fb38b717b5addcffd2d5ef7c188feea
Reviewed-on: http://git-master/r/224836
(cherry picked from commit 2024a2a9ea7d868e2c05d1f15dd3c7f1a9ba2e13)

Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/280997
(cherry picked from commit 57b79ad70752a164f1446a8a49a54be7b2076098)
Change-Id: I2b754466bdb5c9d376b422ebd3e72e54ed790ef6
Reviewed-on: http://git-master/r/328025
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
drivers/video/tegra/host/nvhost_acm.c