On Mon 02-07-18 09:59:06, Yang Shi wrote:
If you want to do some coding style cleanups make them a separate patch.
On 7/2/18 6:42 AM, Michal Hocko wrote:
On Sat 30-06-18 06:39:43, Yang Shi wrote:Oh, yes. I did some coding style cleanup too.
Introduces two new helper functions:There are whitespace changes which make the code much harder to review
They will be used by do_munmap() and the new do_munmap with zapping
large mapping early in the later patch.
There is no functional change, just code refactor.
+static inline bool munmap_addr_sanity(unsigned long start, size_t len)e.g. here.
- unsigned long end;
- struct vm_area_struct *vma, *prev, *last;
+ if ((offset_in_page(start)) || start > TASK_SIZE || len > TASK_SIZE - start)
+ return false;
- if ((offset_in_page(start)) || start > TASK_SIZE || len > TASK_SIZE-start)
- return -EINVAL;
The resulting diff would be much easier to review.