Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp803474imn; Tue, 26 Jul 2022 09:41:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwT9l6ogSg0h1p5iaibLhJhYQldK9JLeFFrJqnJI/RPbv8YFYn5Xj4XpcvVXeM1xkbeiNX X-Received: by 2002:a17:907:87b0:b0:72b:9f0d:3f89 with SMTP id qv48-20020a17090787b000b0072b9f0d3f89mr14470283ejc.734.1658853710462; Tue, 26 Jul 2022 09:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658853710; cv=none; d=google.com; s=arc-20160816; b=YiIxOjdui+i+lWOT1BElUMlUOKOa156Cf3Jje90MLXoekaViDQmL50Po/e/CJn51gw iOCXv7EdpFuuIWtatRR19RTFUghYQfKwX5dCkO1qr+SDpIEG+ipWN0BNjjRwlFAJI5Ag acNi7go15n6EXCaa7DgxoOItrwDC/lsgM7dcTK0p9rSoSiLaiWLnB0q8GeSIZ5Y4Zyr+ wjHyUmXmHJ6evPDRUt063DRnRmJtJcikvY2jPuzgwktFStpdzV06i7ilzpJiSQIujtq7 omhJs4fndSpApNEv7ZhpxHe8h7vfuHNyvr3/enOejLZYNPoMlYlusjeKCQjxt8QyjBCA 8VZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ttV5vBFo81neCUa67b9tRifIFb4vLEVioSDpa2+KStc=; b=L1xK4siIkgBDaUOZIunMG1Pj0Ey6GCBgsj4mPPgZLDrIW9WNAVRWqi7XBjIhxTZd97 0p2ZnHdjwLsqf00LGP39sqdyATlnsynELkSJMswikEWz7YaVJfR1Aa3q1p20bLW1WgF4 30BDshzFJFy92ZoKbVlgKYbuMQJae7vELebtQOoqztp1FiZJNCLimDaWqubQBmpRRE4q ltTjVGVVBbp3BpgRGOqU6ZWDZP0tLFFB2MXmKMZIqHtBuDPbWS70E2w7kRhdQFkNPqAf rXqGUDVajngS4mlWmZ/H350V33nmK5laZ1IMWz9g7ZJBkcx1lZ2gp08a98GEyU8lptTS bQJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="bQNn/HIE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs11-20020a170906dc8b00b0072b1c605e89si16980429ejc.398.2022.07.26.09.41.25; Tue, 26 Jul 2022 09:41:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="bQNn/HIE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239332AbiGZQ07 (ORCPT + 99 others); Tue, 26 Jul 2022 12:26:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiGZQ06 (ORCPT ); Tue, 26 Jul 2022 12:26:58 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16F852124B for ; Tue, 26 Jul 2022 09:26:57 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id f15so9901414edc.4 for ; Tue, 26 Jul 2022 09:26:57 -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=ttV5vBFo81neCUa67b9tRifIFb4vLEVioSDpa2+KStc=; b=bQNn/HIEV6bNqMxSkqhpn4F1zuXjz1nAKwJuWwLas4x5rbqspUs4sfKW2IrX9JC/Z8 R8wsOZP1GmQxF2GOMGx+JO8TuOmZmJDbMl5Z0bkLy/XRtFz/ZUXZ1rGiV5qZuHHHkQrE +H5bBo55CttlIBNL7fMpNXlGOnttCDBoa1FwE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ttV5vBFo81neCUa67b9tRifIFb4vLEVioSDpa2+KStc=; b=OrshPow09kkKTZFfuLlg72GkfRTnMm4zB4vXczXl9nCbSKUMc/6aU4bwhG6sTfk7N6 f0NPaSF6Zwuofbr7ZpLEBLgFTEniA/fPQYmrKBY4acExHOvz7BjLufmclOAD89/18Pco RIR7eAN92ABd882kZhQhTjb9ouHUAuPrCFvp4BZVn4pF8JVLQ1S3bLUmMvfTHFePdUJo ERG5v6VQs/sTuBUK6g4bpLVed7pcYd9gcv76hT43SuLwetZUn00VYsAJASFQWHxcfUuk hSV/r+BK2sSmmaHl1Wa0Bd8oWhr6S/ankSyUqHgzLVcA7V3f+43PAvkglLBOe6Fb/td0 VfyQ== X-Gm-Message-State: AJIora8KWeqtdtMMu1/W/Uuk/IUcS3bZtbTPaV4qiYi/KnjxYsxEfRz6 lfXRbo15CDePzeWUTilNYRcnsl6IinjTb9Zv X-Received: by 2002:a05:6402:524f:b0:43b:ff9b:2cc0 with SMTP id t15-20020a056402524f00b0043bff9b2cc0mr11137654edd.398.1658852815417; Tue, 26 Jul 2022 09:26:55 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com. [209.85.221.51]) by smtp.gmail.com with ESMTPSA id w23-20020a17090649d700b0072b33e91f96sm6649829ejv.190.2022.07.26.09.26.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jul 2022 09:26:55 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id g2so12837792wru.3 for ; Tue, 26 Jul 2022 09:26:54 -0700 (PDT) X-Received: by 2002:adf:dd91:0:b0:21e:4e97:c146 with SMTP id x17-20020adfdd91000000b0021e4e97c146mr11197493wrl.281.1658852814595; Tue, 26 Jul 2022 09:26:54 -0700 (PDT) MIME-Version: 1.0 References: <20220726062436.90290-1-zhengqi.arch@bytedance.com> <621fb975-413d-a6b4-8126-0b78d5b60853@redhat.com> In-Reply-To: <621fb975-413d-a6b4-8126-0b78d5b60853@redhat.com> From: Linus Torvalds Date: Tue, 26 Jul 2022 09:26:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm: fix NULL pointer dereference in wp_page_reuse() To: David Hildenbrand Cc: Qi Zheng , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 26, 2022 at 12:45 AM David Hildenbrand wrote: > > > VM_BUG_ON(!(vmf->flags & FAULT_FLAG_WRITE)); > > - VM_BUG_ON(PageAnon(page) && !PageAnonExclusive(page)); > > + VM_BUG_ON(page && PageAnon(page) && !PageAnonExclusive(page)); > > Indeed, fortunately, only an issue in the VM_BUG_ON statement Well, at least Fedora ends up enabling CONFIG_DEBUG_VM by default, so normal people - not just VM people - can definitely see this. > Reviewed-by: David Hildenbrand Applied. Linus