]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix fdinfo race with process exit
authorPhilip Yang <Philip.Yang@amd.com>
Thu, 29 Jul 2021 21:19:54 +0000 (17:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Aug 2021 18:20:40 +0000 (14:20 -0400)
commit610cecdfafec9b088c71854ab7a3369723a5832b
tree2c95a0dd113848f31f803f3b5073ba4c2ddd5a01
parent42a7a13765e773cf98cdd1ec17896e046a1ac112
drm/amdgpu: fix fdinfo race with process exit

Get process vm root BO ref in case process is exiting and root BO is
freed, to avoid NULL pointer dereference backtrace:

BUG: unable to handle kernel NULL pointer dereference at
0000000000000000
Call Trace:
amdgpu_show_fdinfo+0xfe/0x2a0 [amdgpu]
seq_show+0x12c/0x180
seq_read+0x153/0x410
vfs_read+0x91/0x140[ 3427.206183]  ksys_read+0x4f/0xb0
do_syscall_64+0x5b/0x1a0
entry_SYSCALL_64_after_hwframe+0x65/0xca

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c