From patchwork Thu Oct 20 22:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Lougher X-Patchwork-Id: 449 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp353422wrr; Thu, 20 Oct 2022 15:38:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fVxJa7KjlLjABooRpBHp3I8MHDkeqVMxqhsXjafLoI0b3/rUsLVrGpygqSAOlWHH+0HIK X-Received: by 2002:a17:907:3e03:b0:722:e694:438 with SMTP id hp3-20020a1709073e0300b00722e6940438mr13280345ejc.755.1666305535557; Thu, 20 Oct 2022 15:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666305535; cv=none; d=google.com; s=arc-20160816; b=0XeBPC5mNNsyxxlWNGt7e+FXmpcNgdsHRqz6zqzhe0Hel5Zxk3Al6L65xfnoCTQD0X bpsPE3mmrOOwCFApTTrTYgP7qWfw2RPyZp3C2W7wo9eN/DWVqhGWtNZW9qAL65VYuE1e LpJLskqWt1OhwK+cxz3DPU7AjRR1scKXEeBtHa1KwR2ziWy8+XM7h6OTgX6Fz+VbEtpi gkBzQt/eBCOmBZf+csQM5tt43FXgkzTN9QQ+08dxn1axxaQXNxoiyJ1wfNUC7IuXbhSf iZ8fEnfirwU6YNORW3Ro236yFiVWAsLvsg+STccqeaP3h+PdoePICrituq+NjnhKBqEX U3Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ynTqdZ/I14jl8vkxs3ZNy4d1MTFNfdGvmTSzCUyf9mA=; b=GOw5r14TJ5/S3IGi1bJX9YTRPSaR9Fl6G665C96DrDSJRZG9sM7PiBKZrn8j3GnQnC yXqAzW0jjBzLZRzWYj26yoKnPO1V1XwaUDEp6sIn1u74Qc7ITWqSE22gZRGUwP7Kc4az K8DsP++nn0kVJ0ZX4BuqtJ5L56mBwfIGCrT8VP0NpYpeiXVpTcTWOYI1YJc5T+xYmO65 K1Xr72lKjgso6HCKE1d/giGfjR2tdnlAmBS6COk6gFFYwqT+KAzCj02qDsQzfut86dSB m7yfFWfgdOKtlHXgcnc+SPK3goWTSk8ixzYInS+yN+WJ42w6va16Z9h4MBKXA5qCaa3L DEfA== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o14-20020a170906974e00b007919388d2c6si10470906ejy.357.2022.10.20.15.38.31; Thu, 20 Oct 2022 15:38:55 -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; 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 S229583AbiJTWge (ORCPT + 99 others); Thu, 20 Oct 2022 18:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiJTWgd (ORCPT ); Thu, 20 Oct 2022 18:36:33 -0400 Received: from p3plwbeout15-04.prod.phx3.secureserver.net (p3plsmtp15-04-2.prod.phx3.secureserver.net [173.201.193.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E261B65C0 for ; Thu, 20 Oct 2022 15:36:30 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.145]) by :WBEOUT: with ESMTP id le9MojL9sA2xwle9NoEYOU; Thu, 20 Oct 2022 15:36:29 -0700 X-CMAE-Analysis: v=2.4 cv=Z5UpoFdA c=1 sm=1 tr=0 ts=6351cd6d a=7e6w4QD8YWtpVJ/7+iiidw==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=Qawa6l4ZSaYA:10 a=yWIVPUuzvU3vGxsu7U8A:9 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: le9MojL9sA2xw Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=phoenix.fritz.box) by smtp12.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1ole9M-0006zQ-4P; Thu, 20 Oct 2022 23:36:28 +0100 From: Phillip Lougher To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: hsinyi@chromium.org, regressions@leemhuis.info, regressions@lists.linux.dev, dimitri.ledkov@canonical.com, michael.vogt@canonical.com, phillip.lougher@gmail.com, ogra@ubuntu.com, olivier.tilloy@canonical.com Subject: [0/3] squashfs: fix some regressions introduced in the readahead code Date: Thu, 20 Oct 2022 23:36:13 +0100 Message-Id: <20221020223616.7571-1-phillip@squashfs.org.uk> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Mailcore-Auth: 439999529 X-Mailcore-Domain: 1394945 X-123-reg-Authenticated: phillip@squashfs.org.uk X-Originating-IP: 82.69.79.175 X-CMAE-Envelope: MS4xfIFzlIKSW3XYzndlyK3M7JgxAcxICOuXXO8radpldVOTlbDE48hfp5jDgl6yt923e2ox6Nh+FQoyOjMM8f4Xgkf158Hv9r5L1EQRjwYZQ0h+CDdtUBHp /v2aOlUjHPMvSbqATUJCDv5y3L54DwRC5kPir9xrqCw0SV6mAmGiUw/fPL3aA5j0kT+PFYN0lm6GA5nQUMSz+FqhQhf2AocFgkE= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747247993686807851?= X-GMAIL-MSGID: =?utf-8?q?1747247993686807851?= Hi, This patch-set fixes 3 regressions introduced by the recent readahead code. The first regression is causing "snaps" to randomly fail after a couple of hours or days, which how the regression came to light. ---------------------------------------------------------------- Phillip Lougher (3): squashfs: fix read regression introduced in readahead code squashfs: fix extending readahead beyond end of file squashfs: fix buffer release race condition in readahead code fs/squashfs/file.c | 23 ++++++++++++++--------- fs/squashfs/page_actor.c | 3 +++ fs/squashfs/page_actor.h | 6 +++++- 3 files changed, 22 insertions(+), 10 deletions(-) Tested-by: Bagas Sanjaya