Skip to contentSkip to conversation

mm/vmalloc: free unused pages when shrinking vrealloc() allocation

PATCH Jill Ravaliya 1 participant 1 message May 9 Memory management

lore
Share & tools
lore
#0 lore raw

Thank you for the pointer to the AI review and for taking the time to respond.

The review identified several real issues I missed:
- vunmap_range() called with equal start/end when PAGE_ALIGN(size) == alloced_size (confirmed by syzbot)
- No handling for huge page allocations
- Missing vm_reset_perms() for VM_FLUSH_RESET_PERMS areas
- Lockless modification of vm->nr_pages races with /proc/vmallocinfo readers
- vm->size left unmodified after shrink

Uladzislau pointed me to Shivam Kalra's v12 series which correctly addresses all of these cases. I am withdrawing my patches in favor of his work and studying his series to understand the full complexity of a correct fix.

Jill Ravaliya