mm/mlock: return EINVAL for illegal user memory range in mlock
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9C0QZ -------------------------------- While testing mlock, we have a problem if the len of mlock is ULONG_MAX. The return value of mlock is zero. But nothing will be locked since the len in do_mlock overflows to zero due to the following code in mlock: len = PAGE_ALIGN(len + (offset_in_page(start))); The same problem happens in munlock. Fixes: 1da177e4 ("Linux-2.6.12-rc2") Signed-off-by:Ma Wupeng <mawupeng1@huawei.com>
Loading
Please sign in to comment