Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2788806rwd; Fri, 26 May 2023 11:11:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kTcEv2t1DqisEeuTCtTexvaL0FNNqo6jmO9PdmkZsHla2SjN0EaMRpLyBry5s6z5GKubS X-Received: by 2002:a05:6a20:8203:b0:10f:7abd:fe5e with SMTP id w3-20020a056a20820300b0010f7abdfe5emr118260pzb.40.1685124693641; Fri, 26 May 2023 11:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685124693; cv=none; d=google.com; s=arc-20160816; b=fYOxRlfEgdHa9dN91lcPksm6wd5sAeH5syeSGGWpoODrA6F67EDMubbdjznSB4D++c CiUADk5iW3NeL1Ks6lS/zCSWEmFPYWMTlmI20yWXb4IMIk7zGI0SP9hGJvIsHskI9Hfy thkrurz/b/bpF0n1h02TyEAZsnslj1D8yS7k/gtGGRqaRMdITh3z8ysyYhZdpOxerjLt t9ZQ/VH+zep0Ihg3XZmuSnmL4JpAlG2T438b+bxCOmxM1phZx9LUnU31aEARuEUgjVXb 2O3ls/uXUVYriBs63IYN8cc8ucBfZLFXqt8QCo3bXcMIAIutupN061Q/VknFxMmkvb7Y R89Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=7ChmCrBrfYRoBTCJcegVpxjMKbCaHF7G68erD+oT0Lo=; b=oOKy+R5e05xvtzKND2cY/q6DRjkTqU/hrlQQg5Lh7GWbwRDj5KutPgm79HQjJPRMJV 7nvNCrgfX2GhykJz/zTgNvG8FbSKwO3GPgZuK3EGC9JbNRBzHGtfF+/2ZHg6if/xE7z/ jRJj7F7G+gAdIrU5os6x8E1ZOGUq4+vD3ZRc6Cg1H9yx5chnKMu3oRGs8qgd4d+qC5WK sN/eLgADcGhIecEjjl+5MStX6AL2QZQfQMXHxT7EqtyuNN9p0UTOfiHUMEMdG8psDseu D5XXhPdP7UTlUTLcvQzPuVwK2nhTt2vGICOXUp+occbdgtxm/EL3SCXwS+ya7er38InB rbUg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020aa7982c000000b0064388918719si4428924pfl.85.2023.05.26.11.11.19; Fri, 26 May 2023 11:11:33 -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 S237116AbjEZR7E (ORCPT + 99 others); Fri, 26 May 2023 13:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236289AbjEZR7D (ORCPT ); Fri, 26 May 2023 13:59:03 -0400 Received: from p3plwbeout18-05.prod.phx3.secureserver.net (p3plsmtp18-05-2.prod.phx3.secureserver.net [173.201.193.190]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3244CC9 for ; Fri, 26 May 2023 10:59:02 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.142]) by :WBEOUT: with ESMTP id 2biOq4rRItp5M2biPqxdQ3; Fri, 26 May 2023 10:59:01 -0700 X-CMAE-Analysis: v=2.4 cv=cKYlDnSN c=1 sm=1 tr=0 ts=6470f365 a=s1hRAmXuQnGNrIj+3lWWVA==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=IkcTkHD0fZMA:10 a=P0xRbXHiH_UA:10 a=3-RhneuVAAAA:8 a=FXvPX3liAAAA:8 a=oceKJ4aG_Jk7OyBK0BMA:9 a=QEXdDO2ut3YA:10 a=VLVLkjT_5ZicWzSuYqSo:22 a=UObqyxdv-6Yh2QiB9mM_:22 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: 2biOq4rRItp5M Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=[192.168.178.87]) by smtp11.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1q2biO-00049q-Mk; Fri, 26 May 2023 18:59:01 +0100 Message-ID: <7a5088a8-b5dc-472d-4f43-29d68e3cde16@squashfs.org.uk> Date: Fri, 26 May 2023 18:59:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH mm-nonmm-unstable v2 1/2] squashfs: fix page update race To: Vincent Whitchurch , Andrew Morton Cc: hch@lst.de, linux-kernel@vger.kernel.org, kernel@axis.com References: <20230526-squashfs-cache-fixup-v2-0-6fb7723c3647@axis.com> <20230526-squashfs-cache-fixup-v2-1-6fb7723c3647@axis.com> Content-Language: en-GB From: Phillip Lougher In-Reply-To: <20230526-squashfs-cache-fixup-v2-1-6fb7723c3647@axis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: MS4xfAMLOAqD63ofpVwlW9P4MbZMqbkYrM3GnbTu2EJ0Qk85JEsisnhWAZaafEqmDoNODMt1kFraVCJSUbOJgnOKVydmvjB3Fd1RDBm1nQsa1kLXL8Q/gr0e jmNXfjGLBwjrXXSNp1XKd0JQswZJs5+LW2PZDrtqK7nOZBZhR7JsJk04G341xtsCwNREOvrxZq9ABQOixM/I+Uz5u7pbBEYk72U= X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 26/05/2023 14:57, Vincent Whitchurch wrote: > We only put the page into the cache after we've read it, so the > PageUptodate() check should not be necessary. In fact, it's actively > harmful since the check could fail (since we used find_get_page() and > not find_lock_page()) and we could end up submitting a page for I/O > after it has been read and while it's actively being used, which could > lead to corruption depending on what the block driver does with it. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Vincent Whitchurch Reviewed-by: Phillip Lougher