Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1856009ybb; Thu, 9 Apr 2020 10:14:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLVplcsg7Y6tThNeFa+fZTdzTgVMNQJynhytU5ece/cZdIOi+fxbglSWccMgxXV9KOn9uHf X-Received: by 2002:ac8:7351:: with SMTP id q17mr338647qtp.237.1586452471974; Thu, 09 Apr 2020 10:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586452471; cv=none; d=google.com; s=arc-20160816; b=FcEV5u2j3saZF7Zofwsxy6m61D0K5V/XOmVZoK35LLZH02cIoKjauP/A7pV2mYDSly rrPw76yJZAm9RLSk4wUtX+JsQlVfEQ+PJryKt4lkdbKxs2rAeb/qLi9q8VSngWwYUiLU JQ1i6nxBQItC+kxGhG6SFBcNjhUp4z9qMMSP+o95juWXMcCSlhPiaKDx11HLzyo3PlTC 6ZsmoedCSsdWA8og79to3BwYLUVxNcV3KCrxicrhjiseDIVbKTxiEmzRYpf/faWY6dH2 FGTsktL9HvF4qyT2F0P2UuKbpzhEu8Q+2KlqAEWORpYFUZ7tyh85DIUrEnGpFTng9Ad5 Dayw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VOBvJudjKhEH/nw8efrp6OPdZhccp/DwAqikzCITmjM=; b=aC4+GN+DR+zgIHxJqb0LHIx6nNrmAprWrKGIluOCTHf8fr5BZRsv0NwrPOpiqfRcRa FhV9R+lgTKcWvEP9pi6e1HZIrkyPRdTo1rbI48XChYP4zaDXqje1ubgIIqpghq95bzVt oMNMv8hhI94FjV88ujhUhx3b+W0ticK2U0wG7cXoLt34xuaaY5rUF8qOYTNqoVlWfbIj 0mC5fYqvJbiYXFP+jla8XH0HfypMmhQINJ4RtNlTzaokVPxnxVHQj9qT+ITyFsctd+ZJ PbT2Cx2ymROeenDWDdTPiak2KgG7h2woTW5c3JV42aO7kZunMjMrniJL0ir1kEWqC5GB i8dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="g/c2K9h6"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si5936944qvz.130.2020.04.09.10.14.13; Thu, 09 Apr 2020 10:14:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="g/c2K9h6"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727549AbgDIQmm (ORCPT + 99 others); Thu, 9 Apr 2020 12:42:42 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37455 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbgDIQml (ORCPT ); Thu, 9 Apr 2020 12:42:41 -0400 Received: by mail-lj1-f193.google.com with SMTP id r24so378198ljd.4 for ; Thu, 09 Apr 2020 09:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VOBvJudjKhEH/nw8efrp6OPdZhccp/DwAqikzCITmjM=; b=g/c2K9h6KURBS6W9N4fbTAdz4lPq7rQgnK1C1AMox8Dk13rYHm8TVDSEdtCaELIaHj K5A2prQAM+bjd/a8DAF34WRkus40YIkGPK8sdNA/kv8cga5k3qqNZZiWe7sIdkB/l/5H D3vBdaHbcUxw2MOc7soiyHBjtXUcgvWeObgK8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VOBvJudjKhEH/nw8efrp6OPdZhccp/DwAqikzCITmjM=; b=hS+xfh3hpuzW4um9OXTJaPUSDTC9AMhfnBFIU9OzCSBi/dbaeOzKINfQUJAGm9Ks3O mJZQ3ME50FUnCFXU73KFgXiZH/c8sdjmmvV6umH2mDPJ2x8Iod3UP6425/4DbARtjgSk sqbdNDi28CvqoDpUMiQ22SvfYCdt2PeGMVBibs+EPV744ubdN/Ys1eaiMKMw8xRvR9OL 1sPUtsa4Ol0nnYCXJ/1oocv+peT2WjrIOhMxg334IWOHYkU6EQP3Yg89622LhAtxvZXw 2F0FuV+5oFz4ErkDf80LflkM0Qal59uz3xonT02fgTOjl5Bezc+WeUSHZK1IOAoGsuAd sU7w== X-Gm-Message-State: AGi0PuZhse1QaBVJfSsugGNHmsjGJfhdR5mZgJu/BFEtWeXKGHmuafnS rPBuJ2FL+Kt8jlM8J91tKmEZPxu65Fs= X-Received: by 2002:a2e:a308:: with SMTP id l8mr406796lje.282.1586450557822; Thu, 09 Apr 2020 09:42:37 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id e16sm3837616ljh.18.2020.04.09.09.42.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2020 09:42:36 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id x23so157943lfq.1 for ; Thu, 09 Apr 2020 09:42:36 -0700 (PDT) X-Received: by 2002:a19:6144:: with SMTP id m4mr99713lfk.192.1586450556113; Thu, 09 Apr 2020 09:42:36 -0700 (PDT) MIME-Version: 1.0 References: <20200408014010.80428-1-peterx@redhat.com> <20200408014010.80428-2-peterx@redhat.com> <20200409070253.GB18386@dhcp22.suse.cz> In-Reply-To: <20200409070253.GB18386@dhcp22.suse.cz> From: Linus Torvalds Date: Thu, 9 Apr 2020 09:42:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] mm/mempolicy: Allow lookup_node() to handle fatal signal To: Michal Hocko Cc: Peter Xu , Linux Kernel Mailing List , Linux-MM , Andrew Morton , syzbot+693dc11fcb53120b5559@syzkaller.appspotmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 9, 2020 at 12:03 AM Michal Hocko 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