Kernel bug: WARNING: refcount bug in __vma_enter_locked
Subsystem: mm
Status: fixed

Crash report:
------------[ cut here ]------------
refcount_t: saturated; leaking memory.
WARNING: lib/refcount.c:19 at 0x0, CPU#0: syz.0.22/6009
Modules linked in:
CPU: 0 UID: 0 PID: 6009 Comm: syz.0.22 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:refcount_warn_saturate+0xc5/0x110 lib/refcount.c:19
Code: 61 05 33 0b 67 48 0f b9 3a eb 37 e8 b5 0e 2b fd 48 8d 3d 5e 05 33 0b 67 48 0f b9 3a eb 24 e8 a2 0e 2b fd 48 8d 3d 5b 05 33 0b <67> 48 0f b9 3a eb 11 e8 8f 0e 2b fd 48 8d 3d 58 05 33 0b 67 48 0f
RSP: 0018:ffffc90002f77568 EFLAGS: 00010293
RAX: ffffffff8496d15e RBX: 0000000000000000 RCX: ffff888032e50000
RDX: 0000000000000000 RSI: ffffffff8ea876c0 RDI: ffffffff8fc9d6c0
RBP: ffffc90002f77690 R08: ffff888032e50000 R09: 0000000000000005
R10: 0000000000000004 R11: 0000000000000000 R12: ffff88807e166940
R13: ffff88807e1668c0 R14: ffff88807e166940 R15: 0000000000000000
FS:  00007f5cb31476c0(0000) GS:ffff888125a3e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5cb3146f98 CR3: 00000000753a6000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 __refcount_add_not_zero include/linux/refcount.h:187 [inline]
 refcount_add_not_zero include/linux/refcount.h:212 [inline]
 __vma_enter_locked+0x62e/0x6a0 mm/mmap_lock.c:69
 __vma_start_write+0x23/0x140 mm/mmap_lock.c:96
 vma_start_write include/linux/mmap_lock.h:213 [inline]
 vma_merge_existing_range mm/vma.c:900 [inline]
 vma_modify+0xf62/0x1a70 mm/vma.c:1611
 vma_modify_flags_uffd+0x204/0x250 mm/vma.c:1704
 userfaultfd_clear_vma mm/userfaultfd.c:1995 [inline]
 userfaultfd_release_all+0x34c/0x5d0 mm/userfaultfd.c:2114
 userfaultfd_release+0xe7/0x1b0 fs/userfaultfd.c:887
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 kernel/task_work.c:233
 get_signal+0x11ec/0x1340 kernel/signal.c:2807
 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline]
 exit_to_user_mode_loop+0x87/0x4f0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x2e3/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5cb238f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5cb3146fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: fffffffffffffff4 RBX: 00007f5cb25e6090 RCX: 00007f5cb238f749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f5cb2413f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5cb25e6128 R14: 00007f5cb25e6090 R15: 00007ffff48a5158
 </TASK>
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	05 33 0b 67 48       	add    $0x48670b33,%eax
   5:	0f b9 3a             	ud1    (%rdx),%edi
   8:	eb 37                	jmp    0x41
   a:	e8 b5 0e 2b fd       	call   0xfd2b0ec4
   f:	48 8d 3d 5e 05 33 0b 	lea    0xb33055e(%rip),%rdi        # 0xb330574
  16:	67 48 0f b9 3a       	ud1    (%edx),%rdi
  1b:	eb 24                	jmp    0x41
  1d:	e8 a2 0e 2b fd       	call   0xfd2b0ec4
  22:	48 8d 3d 5b 05 33 0b 	lea    0xb33055b(%rip),%rdi        # 0xb330584
* 29:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2e:	eb 11                	jmp    0x41
  30:	e8 8f 0e 2b fd       	call   0xfd2b0ec4
  35:	48 8d 3d 58 05 33 0b 	lea    0xb330558(%rip),%rdi        # 0xb330594
  3c:	67                   	addr32
  3d:	48                   	rex.W
  3e:	0f                   	.byte 0xf