Re: [PATCH 0/10 -v4] Handle oom bypass more gracefully
From: Oleg Nesterov
Date: Tue Jun 14 2016 - 16:55:25 EST
On 06/14, Oleg Nesterov wrote:
>
> So to me this additional patch looks fine,
forgot to mention, but I think it needs another change in task_will_free_mem(),
it should ignore kthreads (should not fail if we see a kthread which shares
task->mm).
And the comment you added on top of use_mm() looks misleading in any case.
"Do not use copy_from_user from this context" looks simply wrong, why else
do you need use_mm() if you are not going to do get/put_user?
"because the address space might got reclaimed behind the back by the oom_reaper"
doesn't look right too, copy_from_user() can also fail or read ZERO_PAGE() if mm
owner does munmap/madvise.
> but probably I missed something?
Yes...
Oleg.