Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux
Sagar Kamble a5640d61bd gpu: nvgpu: free VEID if the channel is closed
In case of process crash or forceful closure of the channels, userspace
may not release the VEID. In that case, creating further subcontexts
may not be possible.

Hence, when the channel is closed forcibly (linux), release the VEID on
closure of the last channel in the subcontext.

With this, normally on linux, channel close will not relase the VEID
However, on qnx it will release the VEID. So delete subcontext devctl
call on qnx will be nop in normal case hence changed the error print
and error return to success.

Also added check in the subcontext delete ioctl fn that all channels
are unbound before deleting the subcontext. This is to ensure that
channels don't refer to dangling subcontext pointer.

Bug 3979886

Change-Id: I434944b01740720011abce3664394ae8cb0d4e2e
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2858060
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-31 13:25:53 -07:00
..
2020-12-15 14:13:28 -06:00
2019-02-01 09:45:57 -08:00
2023-03-14 04:50:18 -07:00
2021-08-11 01:55:08 -07:00
2023-03-21 02:37:08 -07:00
2022-12-09 15:19:07 -08:00
2022-06-06 05:55:26 -07:00
2023-02-18 02:29:35 -08:00
2023-01-20 03:35:49 -08:00
2023-03-14 04:50:18 -07:00
2022-09-27 23:25:55 -07:00
2023-02-21 03:36:00 -08:00