Re: [PATCH 1/2] mm/mempolicy: Allow lookup_node() to handle fatal signal

Linus Torvalds
2020-04-09T16:42:43Z

On Thu, Apr 9, 2020 at 12:03 AM Michal Hocko <mhocko@kernel.org> wrote:
>
> This patch however doesn't go all the way to revert it because 0 return
> value is impossible.

I'm not convinced it's impossible. And if it is, then the current code
is harmless.

Now, I do agree that we probably should go through and clarify the
whole range of different get_user_pages() cases of returning zero (or
not doing so), but right now it's so confusing that I'd prefer to keep
that (possibly unnecessary) belt-and-suspenders check for zero in
there.

If/when somebody actually does a real audit and the result is "these
functions cannot return zero" and it's documented, then we can remove
those checks.

Ok?

Linus