As far as I can see we explicitly munlock pages everywhere before unmap them. The only case when we don't to that is OOM-reaper. I don't think we should bother with munlocking in this case, we can just skip the locked VMA. I think this patch would fix this crash: http://lkml.kernel.org/r/5661FBB6.6050307@xxxxxxxxxx Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Reported-by: Sasha Levin <sasha.levin@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> --- mm/oom_kill.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 4b0a5d8b92e1..fe58d76c1215 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -447,6 +447,13 @@ static bool __oom_reap_vmas(struct mm_struct *mm) continue; /* + * mlocked VMAs require explicit munlocking before unmap. + * Let's keep it simple here and skip such VMAs. + */ + if (vma->vm_flags & VM_LOCKED) + continue; + + /* * Only anonymous pages have a good chance to be dropped * without additional steps which we cannot afford as we * are OOM already. -- 2.6.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>