From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37ED6ECAAD5 for ; Fri, 2 Sep 2022 19:26:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD807800E7; Fri, 2 Sep 2022 15:26:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A603D800DD; Fri, 2 Sep 2022 15:26:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 900D6800E7; Fri, 2 Sep 2022 15:26:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 76CB7800DD for ; Fri, 2 Sep 2022 15:26:48 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 41AC2C0787 for ; Fri, 2 Sep 2022 19:26:48 +0000 (UTC) X-FDA: 79868127696.17.B97FF91 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id CC276140077 for ; Fri, 2 Sep 2022 19:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=+aGDdFeQMzLHPmPwDmubavRas4E7o74CChqf2peBc4E=; b=WFJU2m+xIhk/3bvLCtMtefHRnO cKQ8toQU7Vrh3ty0LUfvJjw+EBwYhYSJzQRii8vThSwHK+EuoBoUO5sD2X6sfsQVdj2Ofpl+08QJo EURJuGkBQRX33KfZS8rH+wzO9trRAoyrFEaYOVhhlqVig3g6Nds4LRfIyiRDRjec42+nT2ruX2sJI HAR/S+VVsufSJSNElhG2FvAvEwz9gbmMKq0jr+M/332/+BECxoFA/PIJdmWbl61pX9WDSNBVyzPNs +qQg65xwqITxvPtlOm7mjEmmTTerCuzfmV5bii2Tgein3la0wboeX4AfmuS31rBVk0P5zdfdp4Jou f5u1LNvw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUCJP-007HuG-LH; Fri, 02 Sep 2022 19:26:43 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton , linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH 1/2] mm: Fix VM_BUG_ON in __delete_from_swap_cache() Date: Fri, 2 Sep 2022 20:26:38 +0100 Message-Id: <20220902192639.1737108-2-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220902192639.1737108-1-willy@infradead.org> References: <20220902192639.1737108-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662146807; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+aGDdFeQMzLHPmPwDmubavRas4E7o74CChqf2peBc4E=; b=2+iFFa0QvDQxQ8887A2IvOI5IDJIh+kkdrIEDh37CzwIVNbCmfLHdsE2Z/1Z3I18bzQSq1 Ry+vcKhaXCFVZT8cYalxAIrwyX+xuFaoie4P/b2xY/GcpO4FObJTONwB9kkiccZQ+YYyji xUq0S48QREMAMbVOozuq2pRKCvU9ulE= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=WFJU2m+x; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662146807; a=rsa-sha256; cv=none; b=3OsB68Gise2RkXRf5pY5rmZrNJsiHGtzfKap99V1pgkJsIi6a5JkPskFzu+ARcJHKF/Jzf cjll3DdZ/wHP0ozhsoLG5g/PE91XqyA2WIkCCxFrLzIeyMyF1phtKRC/CoywSnw54Y47zM E2RslO98yFdVnvdOWLkHO9kvAFnl5jg= Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=WFJU2m+x; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam08 X-Stat-Signature: n7meqbnsu6mj33h5upix99h6rg4b5hbj X-Rspamd-Queue-Id: CC276140077 X-Rspam-User: X-HE-Tag: 1662146807-726727 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The recent folio conversion changed the VM_BUG_ON() to dump the folio we're storing instead of the entry we retrieved. This was a mistake; the entry we retrieved is the more interesting page to dump. Fixes: ceff9d3354e9 ("mm/swap: convert __delete_from_swap_cache() to a folio") Signed-off-by: Matthew Wilcox (Oracle) --- mm/swap_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swap_state.c b/mm/swap_state.c index e166051566f4..41afa6d45b23 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -151,7 +151,7 @@ void __delete_from_swap_cache(struct folio *folio, for (i = 0; i < nr; i++) { void *entry = xas_store(&xas, shadow); - VM_BUG_ON_FOLIO(entry != folio, folio); + VM_BUG_ON_PAGE(entry != folio, entry); set_page_private(folio_page(folio, i), 0); xas_next(&xas); } -- 2.35.1