summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-12-31 09:37:11 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-04-01 12:12:33 -0400
commitf1be222687a853b0218a5700a213f3d34d8ccc4f (patch)
tree8166a05fb71e9950d89a089e571e953947848d01 /drivers/gpu/nvgpu/gp10b
parent8282b72a0447fbf5fe31204943189ee843c47d38 (diff)
gpu: nvgpu: fix invalid TSG pointer
In gr_gp10b_set_cilp_preempt_pending() we already extract TSG pointer by calling tsg_gk20a_from_ch() which safely returns correct TSG or NULL in error case But before calling g->ops.fifo.post_event_id() we again extract TSG by directly accessing g->fifo.tsg array, and this could result in getting invalid TSG pointer Fix this by removing direct TSG extraction through g->fifo.tsg Bug 2444819 Jira NVGPU-1601 Change-Id: I9d49b5309c74e162828e7cb7d97556aae939a07c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1984954 (cherry picked from commit dcd3778b5ea4e01ab1e5d2dab2b087b8da67b21e) Reviewed-on: https://git-master.nvidia.com/r/2077313 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index 4d7c6d69..4b42678f 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -1801,8 +1801,6 @@ int gr_gp10b_set_cilp_preempt_pending(struct gk20a *g,
1801 gr_ctx->cilp_preempt_pending = true; 1801 gr_ctx->cilp_preempt_pending = true;
1802 g->gr.cilp_preempt_pending_chid = fault_ch->chid; 1802 g->gr.cilp_preempt_pending_chid = fault_ch->chid;
1803 1803
1804 tsg = &g->fifo.tsg[fault_ch->tsgid];
1805
1806 g->ops.fifo.post_event_id(tsg, 1804 g->ops.fifo.post_event_id(tsg,
1807 NVGPU_EVENT_ID_CILP_PREEMPTION_STARTED); 1805 NVGPU_EVENT_ID_CILP_PREEMPTION_STARTED);
1808 1806