linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [BUG] RCU Detected Stall in sys_process_vm_writev
@ 2025-05-19  5:19 Guoyu Yin
  2025-05-19  7:36 ` David Hildenbrand
  2025-05-23 17:34 ` Dave Hansen
  0 siblings, 2 replies; 4+ messages in thread
From: Guoyu Yin @ 2025-05-19  5:19 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, linux-kernel, dave.hansen, luto, peterz, tglx, mingo,
	bp, x86, hpa

Hi,

I discovered a kernel crash using the Syzkaller framework, described
as "INFO: rcu detected stall in sys_process_vm_writev". This issue
occurs during the execution of the sys_process_vm_writev system call,
where RCU detects a stall on CPU 0.

From the dmesg log, CPU 3 is stuck trying to acquire a spinlock in the
pgd_free function (arch/x86/mm/pgtable.c:490), leading to the RCU
stall. This is likely caused by spinlock contention triggered by the
page pinning and unpinning logic in sys_process_vm_writev under high
load or abnormal conditions.

I recommend reviewing the page pinning (pin_user_pages_remote) and
unpinning (unpin_user_pages_dirty_lock) logic in
process_vm_rw_single_vec (mm/process_vm_access.c) to ensure it does
not cause prolonged spinlock blocking due to scheduling delays or
resource contention.

This can be reproduced on:

HEAD commit:

fac04efc5c793dccbd07e2d59af9f90b7fc0dca4

report: https://pastebin.com/raw/v7xV4BdD

console output : https://pastebin.com/raw/GfJLqkpf

kernel config: https://pastebin.com/raw/zrj9jd1V

C reproducer : https://pastebin.com/raw/8Mm5f2kh

Best regards,

Guoyu


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-23 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-19  5:19 [BUG] RCU Detected Stall in sys_process_vm_writev Guoyu Yin
2025-05-19  7:36 ` David Hildenbrand
2025-05-19 15:42   ` Dave Hansen
2025-05-23 17:34 ` Dave Hansen

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