No description
Find a file
Philip Yang 6225bb3a88 drm/amdkfd: svm range restore work deadlock when process exit
kfd_process_notifier_release flush svm_range_restore_work
which calls svm_range_list_lock_and_flush_work to flush deferred_list
work, but if deferred_list work mmput release the last user, it will
call exit_mmap -> notifier_release, it is deadlock with below backtrace.

Move flush svm_range_restore_work to kfd_process_wq_release to avoid
deadlock. Then svm_range_restore_work take task->mm ref to avoid mm is
gone while validating and mapping ranges to GPU.

Workqueue: events svm_range_deferred_list_work [amdgpu]
Call Trace:
 wait_for_completion+0x94/0x100
 __flush_work+0x12a/0x1e0
 __cancel_work_timer+0x10e/0x190
 cancel_delayed_work_sync+0x13/0x20
 kfd_process_notifier_release+0x98/0x2a0 [amdgpu]
 __mmu_notifier_release+0x74/0x1f0
 exit_mmap+0x170/0x200
 mmput+0x5d/0x130
 svm_range_deferred_list_work+0x104/0x230 [amdgpu]
 process_one_work+0x220/0x3c0

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reported-by: Ruili Ji <ruili.ji@amd.com>
Tested-by: Ruili Ji <ruili.ji@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-01-27 15:47:58 -05:00
arch Merge tag 'drm-intel-next-2021-12-14' of ssh://git.freedesktop.org/git/drm/drm-intel into drm-next 2021-12-17 15:23:49 +10:00
block block-5.16-2021-12-10 2021-12-11 09:25:07 -08:00
certs
crypto
Documentation Two DT bindings fixes for meson, a device refcounting fix for sun4i, a 2022-01-14 15:17:17 +01:00
drivers drm/amdkfd: svm range restore work deadlock when process exit 2022-01-27 15:47:58 -05:00
fs Fixes for 5.16-rc4: 2021-12-11 16:21:06 -08:00
include drm/amdgpu: Add interface to load SRIOV cap FW 2022-01-14 17:52:00 -05:00
init
ipc
kernel Merge branch 'akpm' (patches from Andrew) 2021-12-11 08:46:52 -08:00
lib
LICENSES
mm Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu 2021-12-11 16:14:17 -08:00
net
samples
scripts
security
sound sound fixes for 5.16-rc5 2021-12-10 11:43:00 -08:00
tools perf tools fixes for v5.16: 3rd batch 2021-12-11 13:28:02 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Merge tag 'drm-msm-next-2021-12-26' of ssh://gitlab.freedesktop.org/drm/msm into drm-next 2021-12-29 14:02:44 +10:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge tag 'drm-msm-next-2021-12-26' of ssh://gitlab.freedesktop.org/drm/msm into drm-next 2021-12-29 14:02:44 +10:00
Makefile Linux 5.16-rc5 2021-12-12 14:53:01 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.