AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix AMDGPU failure with periodic signal
@ 2025-11-02 21:38 Mikulas Patocka
  0 siblings, 0 replies; only message in thread
From: Mikulas Patocka @ 2025-11-02 21:38 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Andrew Morton,
	David Hildenbrand
  Cc: amd-gfx, linux-mm

Hi

I have a program that registers a periodic timer that sends SIGALRM with
1ms interval. If I compile a dummy OpenCL kernel while the signal is
triggered, I get these messages:

"amdgpu: init_user_pages: Failed to register MMU notifier: -4"

Apparently, there needs to be fatal_signal_pending.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org

---
 mm/vma.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6/mm/vma.c
===================================================================
--- linux-2.6.orig/mm/vma.c	2025-10-13 21:42:48.000000000 +0200
+++ linux-2.6/mm/vma.c	2025-11-02 19:54:04.000000000 +0100
@@ -2156,7 +2156,7 @@ static void vm_lock_mapping(struct mm_st
  * mm_take_all_locks() and mm_drop_all_locks are expensive operations
  * that may have to take thousand of locks.
  *
- * mm_take_all_locks() can fail if it's interrupted by signals.
+ * mm_take_all_locks() can fail if it's interrupted by fatal signals.
  */
 int mm_take_all_locks(struct mm_struct *mm)
 {
@@ -2175,14 +2175,14 @@ int mm_take_all_locks(struct mm_struct *
 	 * is reached.
 	 */
 	for_each_vma(vmi, vma) {
-		if (signal_pending(current))
+		if (fatal_signal_pending(current))
 			goto out_unlock;
 		vma_start_write(vma);
 	}
 
 	vma_iter_init(&vmi, mm, 0);
 	for_each_vma(vmi, vma) {
-		if (signal_pending(current))
+		if (fatal_signal_pending(current))
 			goto out_unlock;
 		if (vma->vm_file && vma->vm_file->f_mapping &&
 				is_vm_hugetlb_page(vma))
@@ -2191,7 +2191,7 @@ int mm_take_all_locks(struct mm_struct *
 
 	vma_iter_init(&vmi, mm, 0);
 	for_each_vma(vmi, vma) {
-		if (signal_pending(current))
+		if (fatal_signal_pending(current))
 			goto out_unlock;
 		if (vma->vm_file && vma->vm_file->f_mapping &&
 				!is_vm_hugetlb_page(vma))
@@ -2200,7 +2200,7 @@ int mm_take_all_locks(struct mm_struct *
 
 	vma_iter_init(&vmi, mm, 0);
 	for_each_vma(vmi, vma) {
-		if (signal_pending(current))
+		if (fatal_signal_pending(current))
 			goto out_unlock;
 		if (vma->anon_vma)
 			list_for_each_entry(avc, &vma->anon_vma_chain, same_vma)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-03  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-02 21:38 [PATCH] fix AMDGPU failure with periodic signal Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox