On Thu, Jul 22, 2021, 7:04 PM Shakeel Butt <shakeelb@xxxxxxxxxx> wrote:
On Thu, Jul 22, 2021 at 6:14 PM Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
>
[...]
> +
> + mmap_read_lock(mm);
How about mmap_read_trylock(mm) and return -EAGAIN on failure?
That sounds like a good idea. Thanks! I'll add that in the next respin.
> + if (!__oom_reap_task_mm(mm))
> + ret = -EAGAIN;
> + mmap_read_unlock(mm);
> +