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().
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -215,6 +215,7 @@ extern struct vm_struct *__get_vm_area_caller(unsigned long size, · 214 unmodified lines | ||
| 215 | 215 | void free_vm_area(struct vm_struct *area); |
| 216 | 216 | extern struct vm_struct *remove_vm_area(const void *addr); |
| 217 | 217 | extern struct vm_struct *find_vm_area(const void *addr); |
| 218 | +struct vmap_area *find_vmap_area(unsigned long addr); | |
| 218 | 219 | |
| 219 | 220 | static inline bool is_vm_area_hugepages(const void *addr) |
| 220 | 221 | { |