On Sat, Sep 15, 2018 at 04:34:57AM +0800, Yang Shi wrote:
Suggested-by: Michal Hocko <mhocko@xxxxxxxxxx>Reviewed-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Suggested-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
Suggested-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Looks good! Thanks for sticking with this patch series.
Minor spelling fixes:
- /*"Detach"
- * Remove the vma's, and unmap the actual pages
- */
+ /* Detatch vmas from rbtree */
+ /** mpx unmap needs to be called with mmap_sem held for write.
+ * mpx unmap need to be handled with write mmap_sem. It is safe to
+ * deal with it before unmap_region().
+ */
* It is safe to call it before unmap_region()
+ ret = __do_munmap(mm, start, len, &uf, downgrade);"downgraded" is one word.
+ /*
+ * Returning 1 indicates mmap_sem is down graded.
+ * But 1 is not legal return value of vm_munmap() and munmap(), reset
+ * it to 0 before return.
+ */