diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2018-09-01 17:05:36 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-20 13:51:40 -0400 |
commit | c28e73ee2f92d1d287637a22d40d170b42771f96 (patch) | |
tree | a22c6e5352fee71ccab2ba859bdef4de66707845 /drivers/gpu/nvgpu/include | |
parent | eada4a3823cd8d1471141c3a4ed7c5ffa9b5e798 (diff) |
gpu: nvgpu: fix race condition in pmu_rpc_handler
There was a race condition between pmu_rpc_handler and
nvgpu_pmu_rpc_execute. The later could free the buffer before
pmu_rpc_handler could access related data.
Added explicit field in rpc_payload, so that nvgpu_pmu_rpc_execute
can wait until pmu_rpc_handler completes.
Bug 2331655
Change-Id: Ic2653524159eff10504b9c2625b5241610b5f5f0
Reviewed-on: https://git-master.nvidia.com/r/1811299
Signed-off-by: Vaikundanathan S <vaikuns@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1817582
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/pmu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h index 81abdb24..7283755a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h | |||
@@ -192,6 +192,7 @@ typedef void (*pmu_callback)(struct gk20a *, struct pmu_msg *, void *, u32, | |||
192 | struct rpc_handler_payload { | 192 | struct rpc_handler_payload { |
193 | void *rpc_buff; | 193 | void *rpc_buff; |
194 | bool is_mem_free_set; | 194 | bool is_mem_free_set; |
195 | bool complete; | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | struct pmu_rpc_desc { | 198 | struct pmu_rpc_desc { |