History

usercopy: Handle vm_map_ram() areas

vmalloc does not allocate a vm_struct for vm_map_ram() areas. That causes us to deny usercopies from those areas. This affects XFS which uses vm_map_ram() for its directories. Fix this by calling find_vmap_area() instead of find_vm_area().

Matthew Wilcox (Oracle) committed 4 years ago

Commit 993d0b21 parent 57cd6d13 files · +6 −7Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/vmalloc.h+1−0
@@ -215,6 +215,7 @@ extern struct vm_struct *__get_vm_area_caller(unsigned long size, · 214 unmodified lines
215void free_vm_area(struct vm_struct *area);215void free_vm_area(struct vm_struct *area);
216extern struct vm_struct *remove_vm_area(const void *addr);216extern struct vm_struct *remove_vm_area(const void *addr);
217extern struct vm_struct *find_vm_area(const void *addr);217extern struct vm_struct *find_vm_area(const void *addr);
218struct vmap_area *find_vmap_area(unsigned long addr);
218 219
219static inline bool is_vm_area_hugepages(const void *addr)220static inline bool is_vm_area_hugepages(const void *addr)
220{221{