mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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 dcd3778b5e)
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>
This commit is contained in:
committed by
mobile promotions
parent
8282b72a04
commit
f1be222687
@@ -1801,8 +1801,6 @@ int gr_gp10b_set_cilp_preempt_pending(struct gk20a *g,
|
||||
gr_ctx->cilp_preempt_pending = true;
|
||||
g->gr.cilp_preempt_pending_chid = fault_ch->chid;
|
||||
|
||||
tsg = &g->fifo.tsg[fault_ch->tsgid];
|
||||
|
||||
g->ops.fifo.post_event_id(tsg,
|
||||
NVGPU_EVENT_ID_CILP_PREEMPTION_STARTED);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user