mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: fix channel reference leak in error case
In gr_gp10b_get_cilp_preempt_pending_chid(), we leak the channel
reference if tsg_gk20a_from_ch() returns NULL
Fix this by calling gk20a_channel_put() in error case
Bug 2444819
Jira NVGPU-1601
Change-Id: Ic5d036c6d043b0b95dd2a564afcc0add67c1ca02
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1984953
(cherry picked from commit 2322cb131c)
Reviewed-on: https://git-master.nvidia.com/r/2077312
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
9e329ca39b
commit
8282b72a04
@@ -1969,6 +1969,7 @@ static int gr_gp10b_get_cilp_preempt_pending_chid(struct gk20a *g, int *__chid)
|
||||
|
||||
tsg = tsg_gk20a_from_ch(ch);
|
||||
if (!tsg) {
|
||||
gk20a_channel_put(ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user