Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp611544pxb; Wed, 18 Aug 2021 09:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMd0xnkFxZpORXVYWfyRHYf2ET6jOBBPQ/6U0+MoWMnhuGemVgGvIO/a1j09RzZjH52bt/ X-Received: by 2002:a5d:8506:: with SMTP id q6mr7751528ion.53.1629305266486; Wed, 18 Aug 2021 09:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629305266; cv=none; d=google.com; s=arc-20160816; b=RXQW9908FB2Gci4cnpcMb32rPOpRIC4lfMu1rr/lQBqwZGXri6TdxpJ4HtOLCtmhqQ qxPXq3/QYsCDYiOv/R2Sv6BTUGk2tf6uhwzSgwZj/na/Z1JGnT5yguOW+MFxIMj949LD X+atJy7lKUdotQjo8dZJSt6bRas/1R15Ot93lOJCc0cCIhrh6lzAkVfElR/6USQfgUYp NlwnrjlebPj1//Zpg++FYgt/ZdyoCVAgp22nLZnMWlftjw1t8x40CpF8VTHu6TTWqw48 ItOkKLfmikAps92zf/RcFcJ6FqubKcAf2fLhDBZdkgeJPvdsCk3e+w03xNwU5FgHUazf YbgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BcolAdz1++Lz5EKAbjNRqtUND/vI1maofEeX6aKJlvY=; b=F4zzxq/3JGMYj8i0J2zLWZaOT0O20e2njj+w3GVLz9PbhmUAD7vD2LaIe0SRW1rDYV cP1v+V96QnjhAMRojdIi+q7YLfv+6qrZXJ19OMtww2QJFJ5rbrdnqFT6HXY/5rGbaDAu lPWjDS8ETw11BUpf1Eihba/3kWk5vQ1Avfe0LhyXYLNBcYVco8ZLoXYcqqcCExNoOC+A TJ79PnvJ5qpjPhhny53NzZ99Ktkcjm5OXBtNuz1XZxq/nOlNZ5AMFXM1WUncb0nq+4xN paQNi6auPtlFfe9Ed1F1fVDNVp4CscXy6lYjV1ZH9lSX1Xw4x+fkTNNg/mYYPICtzKDA 0Quw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MEM+1TG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si317195ilo.50.2021.08.18.09.47.32; Wed, 18 Aug 2021 09:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MEM+1TG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbhHRQrT (ORCPT + 99 others); Wed, 18 Aug 2021 12:47:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhHRQrT (ORCPT ); Wed, 18 Aug 2021 12:47:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664E6C061764; Wed, 18 Aug 2021 09:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BcolAdz1++Lz5EKAbjNRqtUND/vI1maofEeX6aKJlvY=; b=MEM+1TG4nJWbwCPC8xryiQUkX+ 1CLRv7W3sHWrKGnzUH2U3RzElr7169+iSHhDfC+ANHIGxVu3rInkF1APeaq7Z0w0rNYoMC3iWXfRp qcb7Nmr1cBk6QVY2ShT9oEmnngZTGNsEa204N+im4dMUborvKqU+Cw8q0sPN6ESgALHzxRW47PPjk KfgV45mdgHOZczCqXY8Yv2bVIlcdiI7HKT/mU1McKSnmfMuVuRWuJMdUJpei8f2vnu8+Qp/33I01d 6BGgiCX/51sNrJGXWEPHxKiYkLemgTR6WeNT3Nr49e0G74vudL4oY+thfd3rEQ/xR+XbzUXi5xEb1 zoj1d9pw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGOgv-0043X5-BL; Wed, 18 Aug 2021 16:45:53 +0000 Date: Wed, 18 Aug 2021 17:45:25 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: Remove bogus VM_BUG_ON Message-ID: References: <20210818144932.940640-1-willy@infradead.org> <2197941-297c-f820-aa57-fb5167794fb1@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2197941-297c-f820-aa57-fb5167794fb1@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 18, 2021 at 09:34:51AM -0700, Hugh Dickins wrote: > On Wed, 18 Aug 2021, Matthew Wilcox (Oracle) wrote: > > > It is not safe to check page->index without holding the page lock. > > It can be changed if the page is moved between the swap cache and the > > page cache for a shmem file, for example. There is a VM_BUG_ON below > > which checks page->index is correct after taking the page lock. > > > > Cc: stable@vger.kernel.org > > Fixes: 5c211ba29deb ("mm: add and use find_lock_entries") > > I don't mind that VM_BUG_ON_PAGE() being removed, but question whether > this Fixes anything, and needs to go to stable. Or maybe it's just that > the shmem example is wrong - moving shmem from page to swap cache does > not change page->index. Or maybe you have later changes in your tree > which change that and do require this. Otherwise, I'll have to worry > why my testing has missed it for six months. I'm sorry, I think you're going to have to worry :-( Syzbot found it initially: https://lore.kernel.org/linux-mm/0000000000009cfcda05c926b34b@google.com/ and then I hit it today during my testing (which is definitely due to further changes in my tree). I should have added: Reported-by: syzbot+c87be4f669d920c76330@syzkaller.appspotmail.com