From patchwork Fri Oct 20 14:13:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13430799 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 E5A3BC0032E for ; Fri, 20 Oct 2023 14:13:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E3048D00D1; Fri, 20 Oct 2023 10:13:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76C598D0003; Fri, 20 Oct 2023 10:13:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60D1B8D00D1; Fri, 20 Oct 2023 10:13:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4D85A8D0003 for ; Fri, 20 Oct 2023 10:13:41 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1E2A6B653D for ; Fri, 20 Oct 2023 14:13:41 +0000 (UTC) X-FDA: 81366033042.20.3AD3319 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf04.hostedemail.com (Postfix) with ESMTP id 499D440027 for ; Fri, 20 Oct 2023 14:13:39 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=rugqlokS; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf04.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.167.52 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697811219; 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-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=cHYdL6+h/KwcGSepRnbK+lQxAZl07VmP927iBVBWsTk=; b=nAUQmJa/wp0aFENVhiJSEMn2LJMNa+r92v7ndHrV68doPvqcf9XNkdB5lL/5ZYNsuH87XC rkWxwCx2NHQDHA6QjOmRE+llip3kHjoa9hvuDaBHvpH5PghiRAp5dovGzURLzZDI0245ZE UsojP/2s8PfPTPbBojAi5eBmpqeLa/c= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=rugqlokS; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf04.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.167.52 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697811219; a=rsa-sha256; cv=none; b=LIlxYDNtLOkkq3Mhi/vBeFNkgrpsrla3yXbZ7fzhcXFt8A8XLfJEnxGr3iHc5AN1h6CYzY a1cNffJBHCMEom7uprvpn0OpW0zHkKLZMQCJHF8y8s0UvJ+txqalOC61c5ZoeE7GJSg5fM /TqOY2cGiYYGcLHJ6+5wnRPHUBV4rvg= Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-507c8316abcso1088836e87.1 for ; Fri, 20 Oct 2023 07:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697811217; x=1698416017; darn=kvack.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=cHYdL6+h/KwcGSepRnbK+lQxAZl07VmP927iBVBWsTk=; b=rugqlokSbrSAO4UiABOInNGwJH1axHEJcgqgzFcq1okJ2KnkUSJySpSneZfYcS3Ecb 4xqDC22MfjjdcKFUHN+K61eb1jXXYunZ6HJ/nebHX01x0SXxbkPuAxYgT1z+Dgc+183x mIZJzPdCXyrgQuR8qcXaAiIcozekKjB2eLfUj6Vgj/Uiat82rRgorVKzhzivH5Wcc+zO 0twTpZnZ4TMSJ0MBJsOfRLI+HpxUgneUdDgdTk54Z7MOK21+XSB5lkItbe8StuYYomUx RU5jg3Qz9zf6zyLNDbwrHRB28reqYkPEi5cwslxI0og/q7hlAY2lDRC3HoRVJBj3o72S jSNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697811217; x=1698416017; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cHYdL6+h/KwcGSepRnbK+lQxAZl07VmP927iBVBWsTk=; b=rLdZtABXJjpZMqCPNSSLHnTpKmqJ3OsUpPypLKRI8clRm1tkqErnXXAAfR0t31wkDl BDJf9fLY8vUdmokNwlqrqXAiLwywoqMZ5bIz7zc8fVNy0ejyPE6QULZASbiXR/UHIYVd lrd4j/6t4E87j5xxIkgaumRJiIW5nZ04wrNJPBdRQ6as+l0DO/JWAl3EVoWp/UbROnb5 bkKu5BAwAnWtrWOyyix0S6oooQ9n0rts0xNYtR02/JCqNoxdsNvYY1aB0iYNKkPqPIak GDwpwy8DGcANZERyBta4ZhkUu1OrHigiqdqWFP7xh6x+brLCuihVGMItRcyqqzQcO/BU kF6g== X-Gm-Message-State: AOJu0YzpO9JmzqVHHz3gJsFtLzCutfWLCiYxaPh0ade2uLvTyE9pAKn6 zeESbyFvFplx4rfUf4GDADCsJg== X-Google-Smtp-Source: AGHT+IH1LYjTguHo+MHaRdY/6I5NY/1iAzCe0zVXaxylTCz7I0h9K0wfoZx/8GaCPtGlTYREXSVw9Q== X-Received: by 2002:ac2:5456:0:b0:507:b074:ecd4 with SMTP id d22-20020ac25456000000b00507b074ecd4mr1394560lfn.7.1697811217367; Fri, 20 Oct 2023 07:13:37 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id k12-20020adff5cc000000b00326f5d0ce0asm1783191wrp.21.2023.10.20.07.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:13:37 -0700 (PDT) Date: Fri, 20 Oct 2023 17:13:32 +0300 From: Dan Carpenter To: Zach O'Keefe Cc: Andrew Morton , Yang Shi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/2] mm/khugepaged: Fix an uninitialized variable bug Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 499D440027 X-Stat-Signature: tt9ckpkuedq384t8ccggfu9uw8ohfzmp X-Rspam-User: X-HE-Tag: 1697811219-977940 X-HE-Meta: U2FsdGVkX1/887JbKW4uXmjXPoen+Tr5JishxI5MLz2NYVJAXGQKw8mAkEwuY8RuBo9CQ29BO4cdbv7F5dB9ExJqCPBK8e3Xzm6FksmX5O4ryG+sXzz7byVHXY/3noHS1qtg0VYFg8irM302Jey/qdaaNUn4TRwEwNnP+8KNxFRYIZrZUuG/hnlfVKDC9ymgAdX0Dx5keppHdlsJSGV1YhLg/akDL7Sv07ybatNsu3heJm8QBafuqytkHEVwJlztwzFPNdvxdg1q3QT4zT0oba/qLqBZrA27oKK1g8ucxGKzreCvuxJyW2uY1IuO6S3Kl2PTRiiG/GAFHAwdSuLaDCUi0k3qAQoD3DU+ReFMX5bt6wWRBrUdM3pZgaUjjaUjaTCzBRiQ99NBDsrWiFryMLdLRmxej0g19ETV6mulroxZDQECDUDblei2TTVzE66+zRR2n6VwLwJtFvBhJi5ZTf/HuYXV2psPjuEXi7biC+prBCOXjr48P1pTxOLmuUEfsX6aQWAreB0O5439+WBe5J7w1CZCKttPNF4QaBGku+a8K6VTGKojYOVK9/+PztqtNWFGM75LiztkmcWdZ/gmgeyggXb5jkfXmv4FzcxeVoeMVgQTV2p2oHcjpFXGpD/Zn/0zILD+5LGQ7jQp+bb5fh0sz7Q3/NyCcwEbTOPKnDfWD1Gm8gp32OeuRRfSE70LSrqDGh23KLEPfahDgVL7ky6M+9uqTbQjjeVljuF9XR+yNYbv2RjqMwcQKKlzAoYK/A4/bFPBqjSiK/2W7RGxjy13ieatcm6ZZ29fEhXn7gXGVm7Npc2dQgHn7cz1xITQD4J02lAN5JiIhJ2IKgeg/5qxcBTrUNu73F/aHcaBJIuF7+2KKltLQm+Hn35YPyGH5b0AvvWJDilFE7IEtXqj5XwCNKj15XHWyuqQRkQXBQ7I7B3BiERsU36/nLe6tb675Jcbbx7xdozLMtsMvDY H2jG4lzb qmmB5YinwRgqDC0JAvFI7YTFCtoWsU7326NsOgljgEdKnbqphTVQrNmceTmS64W94g6qXz9l8K2QftXC24/yCpsqQ6mhH9UenHALKHAagHvDdxTbibIKXp4G6N3U3Bsy20XF5zIzZAm871iB+wq3rrlMBaXZzOXn3ImnT4MpROS60Vn50trGfVFWIY5OGAW63WhxX/5TTgBs1TnjtI/bn60Hg+Oc8NBve9lQ0hzSnK9GlQy5t4ZXzm6NqBypElalqK/xoH7FHrLQAa0Cu3hTYLX8M0CozQwEa3M2QV0C/aHpbwjSBb+HZVRKMJzBk5OZRXQpF9jJCcQttHUGijSGnMKo0TP4UnQz4YN7swJydq3XQ9jwTQbo9gm5TUMQoWzyO9rcMxn1hvdr2wTfgwOAgvvaAeQ== 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: Smatch complains that "hpage" can be used uninitialized: mm/khugepaged.c:1234 collapse_huge_page() error: uninitialized symbol 'hpage'. Initialized it on this path. Fixes: 50ad2f24b3b4 ("mm/khugepaged: propagate enum scan_result codes back to callers") Signed-off-by: Dan Carpenter --- From static analysis. Not tested. mm/khugepaged.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 0622f8a5175d..a25f5b7c3e7e 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1062,8 +1062,10 @@ static int alloc_charge_hpage(struct page **hpage, struct mm_struct *mm, int node = hpage_collapse_find_target_node(cc); struct folio *folio; - if (!hpage_collapse_alloc_folio(&folio, gfp, node, &cc->alloc_nmask)) + if (!hpage_collapse_alloc_folio(&folio, gfp, node, &cc->alloc_nmask)) { + *hpage = NULL; return SCAN_ALLOC_HUGE_PAGE_FAIL; + } if (unlikely(mem_cgroup_charge(folio, mm, gfp))) { folio_put(folio); From patchwork Fri Oct 20 14:14:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13430800 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 CAC55C00A98 for ; Fri, 20 Oct 2023 14:14:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C19D8D00D3; Fri, 20 Oct 2023 10:14:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 572408D0003; Fri, 20 Oct 2023 10:14:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4398A8D00D3; Fri, 20 Oct 2023 10:14:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 335AA8D0003 for ; Fri, 20 Oct 2023 10:14:45 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 06C2214074E for ; Fri, 20 Oct 2023 14:14:45 +0000 (UTC) X-FDA: 81366035730.25.10CE224 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by imf14.hostedemail.com (Postfix) with ESMTP id 13C6110002D for ; Fri, 20 Oct 2023 14:14:42 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b="Cf/VuUGP"; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf14.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.167.51 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697811283; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:dkim-signature; bh=LEix6po77+AMxuWac9tyRezPTBXoF+z3J1JlBq21Qdw=; b=kBtEwNvXKrsMo5KBTWkTS7RfVVRWItbRTTxm20rVzboj5INSdHNY5oFLXB0V3VbadOypeO 7tbuhtHrMQ4Wv8Da/yYRpMawTkKlndNCozqxmtZvD8s5lsG6xYJYsK68qn8maWSzx8PW3p iFzeuNTYpV5AWR73K0KaQfjiARtpOcY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b="Cf/VuUGP"; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf14.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.167.51 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697811283; a=rsa-sha256; cv=none; b=Vnbc0w1bWgT4LRxDQ3Kdh3DuGGLOQZbEF5kzYqWoBZR6VF8WBrZZZFzSzpYZwtGooKior1 D111aUiVySifLHu2HCkPVhlkn1Zzu8SDSRM9JkMhDW7Fh7IGqYzhBrR9PBV9orT73YLUZ5 FQCK2aPlj7CYLabFE7S72WOYL9TS3mM= Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-507be298d2aso1223094e87.1 for ; Fri, 20 Oct 2023 07:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697811281; x=1698416081; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LEix6po77+AMxuWac9tyRezPTBXoF+z3J1JlBq21Qdw=; b=Cf/VuUGPFhH+av2YZHGNf4Je6/3mqyRwQWFM06heug4dGyHJIshyGlVYqbcNd699B7 v7tazSpc/Kzh/lFji7gqqOj8sxa+cu/M9nZE8kvWxemvONRhzq2KgeRf9iudYoFCXIrH MJd8YRbg8lQUCOAupsmoERR+UEDEvlAue8kq0JymCNhbeLG9M8QTihLOaeWE2ktKlnlW JPumfURztmnsLHz70LGRLIZUD+dhRCQ+Jc4GOtzWzk88XbBatVMen9RuutCOWkQwzMuL W7LO+C8dESevmDJgaeVsJHXYG36Tg5sEaX8fnSNpIVYPhXDakJjdQ9EjMTp607LN8mJc Ftqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697811281; x=1698416081; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LEix6po77+AMxuWac9tyRezPTBXoF+z3J1JlBq21Qdw=; b=WufVrp95wfEtkISpATVjX/NGPZZwqUUZStv6UaXvHIbe4ihcxLSXRU+7LsrzkzcOVw PA3YSU/NhYyOVxEdxfLlJei/hilEhptOK5iyPXOTkDbV3b2zS4C6HgUYIx0XFWSS8lfu ovgLf23RqvhxGMU4zGKHA1eQ4PVHYQ8gDWf2cY6kGYz5dqKz9UpQf9a0jvJ5jx+FjgZL Q223QJhlqNFLKQkb2svZex9v6yseJpvdyw8wzao7sUzsgOdIwE6nzwuwM+fgAj1nH1Zu BZO1qlR4twd46rxTalO2Dhyrz1t90nYAORQeS3OiBnb6fFHku/cW1pDZClPW3GEzCbMw zhMg== X-Gm-Message-State: AOJu0YyvpZodHiSqIn9IDOxobfUGzf6AKNflegI57qf5wOgbpX2ORuzl DtrkjT1kBokXKYa+stUH6P+HHdACHQWF1OJGfys= X-Google-Smtp-Source: AGHT+IEY2Q9dTva1HRYc1JRcPd5non3mbbT8bCtSnB6B4Az9MRd90pdBRPvphDwQxh4UQwpNLeOgYQ== X-Received: by 2002:a19:9156:0:b0:503:985:92c5 with SMTP id y22-20020a199156000000b00503098592c5mr1303266lfj.42.1697811281442; Fri, 20 Oct 2023 07:14:41 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id m10-20020adffe4a000000b0032ddc3b88e9sm1822215wrs.0.2023.10.20.07.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:14:41 -0700 (PDT) Date: Fri, 20 Oct 2023 17:14:36 +0300 From: Dan Carpenter To: Vishal Moola Cc: Andrew Morton , linux-mm@kvack.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] mm/khugepaged: Fix a NULL vs IS_ERR() bug in collapse_pte_mapped_thp() Message-ID: <0882a964-770e-418c-9c34-1a64195baafc@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding X-Rspamd-Queue-Id: 13C6110002D X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 1wgs6sduepfjbxknkdpm5g1tq8o1rfh1 X-HE-Tag: 1697811282-3739 X-HE-Meta: U2FsdGVkX1+FK2XnsOyGuwq6X5IZFPevCQ3yWVrFXissdzKRMCD4jdcRrmJjn5UFPEUOOSmFXFbD4oeJFLtsw2DcGnO5gMWnvt0UN7wru/X5M1+ljMLq2kHDrI0NZmFt43Hy1ISTyQVI1GEz9bzRtw2pnkyDkcjMiIxdfAIVE8eC7pswcAlaeW0TjORMOo++In+gfvu5weLPkmpnn+45841eCYoLEVbL5JljiLLRfeSFZypkTNhf2WIIuwrJ3Rew4FVbkf3jKDXvW8izp1yDKclZnU6ufjSsezdhXrC48Icj8yksN2NbhLEJ3nCMvfWrqj5/+6/JauPoLmUcUq0eJiNxiGmPnnE5hKKBU60RY5Rm9gA0g5eBDaroBXbBk/pKK199RaA3DvFghZgA7iABsvBvnWYP+coWVbZGV070z72lVEKStQ5hQR8gnlZ2uJsWsP9EgaeRTZhoe88iyl0G9R8Tffqogi5QbpknlJxazkOXnKBZCu4hum3I3cyAEPMWn29xxZ2YDW0K//LE+ST1pLVLq59WR/ui5bNaram8WgAKWihJV88FRsp9AnlZWxFDNI6iQIFzgGoq8aoJCXR0bFnDNxFRSIEV8K5uW/d4HXvtTFNY5NBn8d4syvcK64DIO2OdvwC5w2fb5HB1pv+KwCO/AUor8Gl2E+MNF9StGXajWUg+qy39wkXKEKUbSWtLdhPAK+qe1+eroyShobJ9gWTmJRT6c3D3Wvx6FmLuxYzl2MVGsa+DdYdB3kbcqJ1Ub8B5mH6Re/9R9G+fuSQh2ubv9GzpzLkIkcRyL/QA72KPAFyuL4rqNb/opRwvqFlyQL6T5vdw5s4rEMTPJd6js9v9cQmlnWJSUyRYiBqFfKR3Agfh733PeWxVWF99c1K/pmHuvKhbK8ttv1DjHh3qcMPh2Brxl9w3gp6+5oL6VCtIm9JrSIJypcXcia7hvBVjmmy8IWDoMwEK6COan2l 1S1jfp4y QSVhE9EATi2RCHCfzu7PG3WwQVAdQlkBcLKXGw6lsMcaF7LE22nIpf/vIPzAJrL+BNk0qBjOAQFQCilXfEVmPURHrKP36S5YT3+FVVjVdwXWdLpv1bq9B4Gbe039fHa3zQKFjEdSplRCFUpxIp+6K10DupIZg0J4QBVT7crKApTi0ZeDiE07TVRK9WBJMy6dsOChJ1bzxM2KW1gUSGzLdhslghagkMAkOy+Pe1lemmwaGer1cfXzv16IHP7VYemyqRzTItyZ96oIm/vGqPatRb9jVh6+ul9sX8RKvBYTMpCUEm3+c3Jlv6JLTQvcST9r+uhx8KwAA5dULwin9WTWxp9fyygon8bdDCK/9+/l7nVEPZ8agnC+v3Vea7dXCsWfT5HzHqW3V4DoGpxn+lw2kR1Xk3sUy9EdNv18CsubfkZgoo+PCLreNVL4Bq/cbvq7qkq1nFPMpQIqVUSmVb+D23OGuWBucogzbsJmoJL1m5ivaS+tCGb2jqZxISS6MoMstCsdzdp4sJMFDwlDnxm7A+1dkAmnkHv4lJuV042nKNTLV3Ok= 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: This was changed from find_lock_page() which returns NULL to filemap_lock_folio() which returns error pointers. Update the error checking to match. Fixes: 8f5654d233e3 ("mm/khugepaged: convert collapse_pte_mapped_thp() to use folios") Signed-off-by: Dan Carpenter --- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index a25f5b7c3e7e..d977eb50704a 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1508,7 +1508,7 @@ int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr, folio = filemap_lock_folio(vma->vm_file->f_mapping, linear_page_index(vma, haddr)); - if (!folio) + if (IS_ERR(folio)) return SCAN_PAGE_NULL; if (folio_order(folio) != HPAGE_PMD_ORDER) {