In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: change vm->task_info handling
This patch changes the handling and lifecycle of vm->taskinfo object. The major changes are: - vm->taskinfo is a dynamically allocated ptr now, and its uasge is reference counted. - introducing two new helper funcs for taskinfo lifecycle management - amdgpuvmgettaskinfo: reference counts up taskinfo before returning this info - amdgpuvmputtaskinfo: reference counts down taskinfo - last put to taskinfo() frees task_info from the vm.
This patch also does logistical changes required for existing usage of vm->task_info.
V2: Do not block all the prints when task_info not found (Felix)
V3: Fixed review comments from Felix - Fix wrong indentation - No debug message for -ENOMEM - Add NULL check for taskinfo - Do not duplicate the debug messages (ti vs no ti) - Get first reference of taskinfo in vminit(), put last in vmfini()
V4: Fixed review comments from Felix - fix double reference increment in createtaskinfo - change amdgpuvmgettaskinfopasid - additional changes in amdgpugem.c while porting