From patchwork Tue Oct 19 15:27:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1543418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=UP38U750; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYd0Y5L3Jz9sPf for ; Wed, 20 Oct 2021 02:27:41 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mcr1b-0000g3-IP; Tue, 19 Oct 2021 15:27:35 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mcr1Z-0000fQ-HE for kernel-team@lists.ubuntu.com; Tue, 19 Oct 2021 15:27:33 +0000 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 5A6E13FFFE for ; Tue, 19 Oct 2021 15:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1634657253; bh=x8AcYKxHJlhvTNZGC3YC4BIxrS5edeIiX8byRsqBq28=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UP38U750RB3YcsZam32w3DTg41w8cYawlMdb91ssxE45syQzuPDA08Zy9gonFLx+i u4FH2MlvK7sca4Mwipg5/TN6DyNjQY2n0bMPiOIWKSqptSt5km1sq05L3WzvqvVNgp SS4BED7zV6l43gZm3fRKn3+IkP172TdpliJO+qDjU8ClOVcn5BFeEvXgVcJ6TXrp/T 0ljr4ptSdiFb0Ca4nK0FR4TVDn9qpl44hx97HvK6tjqOB6UuQ+IRPxSeoKSuSeeII/ SqWVMgixpo6Un/kzngxu4qxk32oFGEhFIWbVtSW5KWgky76sVPqKfpotnSu4D7m/RW /gJHD92xgmkiA== Received: by mail-ed1-f72.google.com with SMTP id d11-20020a50cd4b000000b003da63711a8aso17880947edj.20 for ; Tue, 19 Oct 2021 08:27:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x8AcYKxHJlhvTNZGC3YC4BIxrS5edeIiX8byRsqBq28=; b=zU+k8wMcJP+I0aLqiywygAWKsKV2UmQIVRIQZZhlfed5WGHydNySFnY0m3fLYT98i9 6N8cKqIiHNJwtyh6wzAcjEnQKcPckB42qG8P9UaegDqnzdNjVAia3XANPA3OM9iTg+5h kTWh7+eJuyoVUI0l/8cmsJR4H8lI4R3dMjNFM0EAdiXcNwQtpDB1T4i52mnoAe0LauEI GPhpUAnASosv3Bv0lXK80HzhgMImr8SvD/ykg6ZfvzJ5MKp1V3IDY/Hp0b/A7tTmHCsV tqJP8MZcdGGe2FVX2wwL/A9R0tHh+wfsv9ckopvWAf3ZsLCK8CpdimFpyBKL0uhqkLZ8 XHMA== X-Gm-Message-State: AOAM530itUeXbRT6ofhFfZ0kRRlZ+ULI9mAeSDiWdPSQmIy1msAnZsw1 2TACRxOruq/XGrLtKaA/8OJyeH0ard4D/YB+VPGOrNSwcgPEPsQVzpxPL7paW9STxh1o78YDW1J 29ZyrBgBgvamnzscdq2/AZWacxzvbDOxHGO+HDpRFmg== X-Received: by 2002:a17:907:9889:: with SMTP id ja9mr41028573ejc.361.1634657253055; Tue, 19 Oct 2021 08:27:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxYQztFh8FCN/tnU+nkhcmzkO0xfXlS19bPX74U6BDXvDD+1qVscl7rLpVepMenQyE49JcAA== X-Received: by 2002:a17:907:9889:: with SMTP id ja9mr41028535ejc.361.1634657252758; Tue, 19 Oct 2021 08:27:32 -0700 (PDT) Received: from arighi-desktop.homenet.telecomitalia.it ([2001:67c:1560:8007::aac:c1b6]) by smtp.gmail.com with ESMTPSA id z19sm10337732ejw.44.2021.10.19.08.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 08:27:32 -0700 (PDT) From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [SRU][B][PATCH 1/2] Revert "UBUNTU: SAUCE: cachefiles: Page leaking in cachefiles_read_backing_file while vmscan is active" Date: Tue, 19 Oct 2021 17:27:27 +0200 Message-Id: <20211019152728.64481-2-andrea.righi@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211019152728.64481-1-andrea.righi@canonical.com> References: <20211019152728.64481-1-andrea.righi@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1947709 This reverts commit 3f467f6131cf27c4ead53797f4562e2cf7272711. Signed-off-by: Andrea Righi --- fs/cachefiles/rdwr.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 37a81919341bf..01efc649c53de 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -512,8 +512,6 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, goto installed_new_backing_page; if (ret != -EEXIST) goto nomem; - put_page(newpage); - newpage = NULL; } /* we've installed a new backing page, so now we need @@ -538,10 +536,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, netpage->index, cachefiles_gfp); if (ret < 0) { if (ret == -EEXIST) { - put_page(backpage); - backpage = NULL; put_page(netpage); - netpage = NULL; fscache_retrieval_complete(op, 1); continue; } @@ -614,10 +609,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object, netpage->index, cachefiles_gfp); if (ret < 0) { if (ret == -EEXIST) { - put_page(backpage); - backpage = NULL; put_page(netpage); - netpage = NULL; fscache_retrieval_complete(op, 1); continue; }