diff --git a/drivers/gpu/nvgpu/os/linux/nvhost_host1x.c b/drivers/gpu/nvgpu/os/linux/nvhost_host1x.c index 5627d993e..177248d21 100644 --- a/drivers/gpu/nvgpu/os/linux/nvhost_host1x.c +++ b/drivers/gpu/nvgpu/os/linux/nvhost_host1x.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -134,7 +135,12 @@ static void nvgpu_host1x_work_func(struct work_struct *work) struct nvgpu_host1x_cb *host1x_cb = container_of(work, struct nvgpu_host1x_cb, work); host1x_cb->notifier(host1x_cb->notifier_data, 0); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)) + kfree_rcu_mightsleep(host1x_cb); +#else kfree_rcu(host1x_cb); +#endif + } static void nvgpu_host1x_cb_func(struct dma_fence *f, struct dma_fence_cb *cb)