summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2026-09-15 16:43:07 +0200
committerJanosch Frank <frankja@linux.ibm.com>2026-09-28 13:35:13 +0000
commit373a58348d90210bc6da3ff270fc4b7ae54b90dc (patch)
tree48186ddcccba4bd420286dce097779b03880aed2 /tools/perf/scripts/python/stackcollapse.py
parentdf2908090cda368b01ff43709f51890076c56157 (diff)
downloadlinux-next-373a58348d90210bc6da3ff270fc4b7ae54b90dc.tar.gz
linux-next-373a58348d90210bc6da3ff270fc4b7ae54b90dc.zip
s390/uv: Rework page allocation for guest variable storage area
Alexander Gordeev reported that the allocation of pages of the guest variable storage area via the uv_alloc_range_cb() callback of apply_to_page_range() will cause problems as soon as s390 fully supports lazy mmu mode. Problem is that uv_alloc_range_cb() allocates pages with GFP_KERNEL while preemption would be disabled. This would result in reports like this: BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:322 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6092, name: qemu-kvm preempt_count: 1, expected: 0 ... Call Trace: dump_stack_lvl+0xae/0x108 __might_resched+0x1de/0x2f0 prepare_alloc_pages+0x1ba/0x220 __alloc_frozen_pages_noprof+0xc6/0x390 alloc_pages_mpol+0xe6/0x220 alloc_frozen_pages_noprof+0x5c/0x80 alloc_pages_noprof+0x22/0x80 uv_alloc_range_cb+0x30/0x300 apply_to_pte_range+0x11a/0x3b0 apply_to_pmd_range+0x13a/0x250 __apply_to_page_range+0x232/0x4d0 apply_to_page_range+0x28/0x40 uv_alloc_stor_var+0x5e/0x90 kvm_s390_pv_alloc_vm+0x118/0x1e0 [kvm] kvm_s390_pv_init_vm+0x84/0x2e0 [kvm] kvm_s390_handle_pv+0x502/0xf70 [kvm] kvm_arch_vm_ioctl+0x234/0xdd0 [kvm] kvm_vm_ioctl+0x33a/0x890 [kvm] __s390x_sys_ioctl+0xfa/0x130 __do_syscall+0x1fc/0x700 system_call+0x72/0x90 Preallocate the pages and make use of vm_area_map_pages() to address this potential future bug. Reported-by: Alexander Gordeev <agordeev@linux.ibm.com> Closes: https://lore.kernel.org/all/e9449c63-b8d2-4ed9-a184-7dcab3e8dfce-agordeev@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions