mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: vgpu: fix resource leak
gr_ctx->tsgid needs to be set to ensure that the GR ctx free sequence will target the correct TSG's GR ctx. Bug 200341631 Change-Id: I83c57597f10ce3af572f114d28312376cea55c2a Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1646790 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
a55e3e361d
commit
6e5a3451d4
@@ -499,8 +499,10 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags)
|
||||
c->vm,
|
||||
class_num,
|
||||
flags);
|
||||
if (!err)
|
||||
if (!err) {
|
||||
gr_ctx->tsgid = tsg->tsgid;
|
||||
err = vgpu_gr_tsg_bind_gr_ctx(tsg);
|
||||
}
|
||||
if (err) {
|
||||
nvgpu_err(g,
|
||||
"fail to allocate TSG gr ctx buffer, err=%d", err);
|
||||
|
||||
Reference in New Issue
Block a user