mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
NVGPU_GPU_IOCTL_GET_EVENT_FD should return -EINVAL when invoked in any chips which donot have NVGPU_SUPPORT_DEVICE_EVENTS enabled. This is resulting in an use-after-free error in UBSAN from syzkaller fuzzing in the nvgpu driver. Also, as an addon remove the flag clk_arb_events_supported as the device events check can be made using the flag NVGPU_SUPPORT_DEVICE_EVENTS. Bug 200463292 Change-Id: I0ed0217704daa9e401b57a268a30b9f798928e4a Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1956070 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>