Skip to contentSkip to conversation

fix AMDGPU failure with periodic signal

PATCH Superseded Mikulas Patocka 1 participant 1 message Nov 2, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix AMDGPU failure with periodic signal

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.

---
 mm/vma.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
mm/vma.c +5 -5
Index: linux-2.6/mm/vma.c
===================================================================
@@ -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)