Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp208962ybl; Thu, 23 Jan 2020 21:58:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzZWnnCfwMzESTsDc2qpVbU9BGhNR165dWu/0hRfTisHhZgenocLy76LF6IXLdpJJzpMmP1 X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr1608014otq.54.1579845531264; Thu, 23 Jan 2020 21:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579845531; cv=none; d=google.com; s=arc-20160816; b=PDB9+BY7EoHtp3Vy93uexJ4fvETNyVTbwiVthw6bRSRhn4cnwMWrA00pcGcCQu9dIe UGyKt7NiiuQXblqEbiCKQyfPIHLsmQoEBRa2rB9KCWOvHyDUdFpULeKhazxpWOPVNLkw 7tXLLjUNI+H0hdcOuuIxhRQ0RLit2eJ5+7U8xxWCcjKpsIwwpjeLW5W7Wsd6uTxVv8HZ dYkVFRMg+Hvpz5xVETO5nx/eGUKJms1P5EUrS0jduZPUw1x0J0Q3706uANBf2n2HwnjP sEBdLzubw/DxrwB5FTOuY6sjrxUKKugLr/Z7qdxJyZwK0Tw87r5TNsnzuq0xn9jZLzpV Z8dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UeJz9jyBNt5yayp7xj4f/SZWo0DpuycvuaFMYq1D8lg=; b=aaFTypS/7dtYQ2caekqP23ikm6Tva+fiwEsPB1HyYs8fw1e1jDM9SK9O9jGqXWX67x kvqsXJ1ACMq46WIX5Wgy+eTVBPoKegLy2THhKiJuaj6ERtGqL3LuMnFleqHOre73C857 5rGbbDZTAxTpSbvVETEbu5S1UBVBfF5Vj03mUUTg9tMB0o6/eEi7j1qvoAFxWF/Og+DD m0+Rae8C4JDI568HS7RLbHBcqIT0KXmj6LJIodAxRSiCZGe9vJjbOVXAYtf9ioYCNJ9N K9FnxjGu4P9BYSVG/xxXUtMVEAVoY/TnAIZ4zm44ryyLHRR1XGJwjDausSZnMm91k+O4 l1yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=NxNxPOFz; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si2339455oto.205.2020.01.23.21.58.39; Thu, 23 Jan 2020 21:58:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=NxNxPOFz; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730349AbgAXFef (ORCPT + 99 others); Fri, 24 Jan 2020 00:34:35 -0500 Received: from sonic304-23.consmr.mail.gq1.yahoo.com ([98.137.68.204]:42825 "EHLO sonic304-23.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730322AbgAXFee (ORCPT ); Fri, 24 Jan 2020 00:34:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1579844073; bh=UeJz9jyBNt5yayp7xj4f/SZWo0DpuycvuaFMYq1D8lg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=NxNxPOFzSfORh0/j+CyjrCAXbIzvw6ZHJA0VT8plACOZ69yKZ55in66tkPbpWI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eBQl9TFfNLq6cAKRZWsr8oNGp4HlJHApqOaFm1.Q4 8RNzJwUqJ87Crb3sx0unDxhoHpV6AiXotap4dvQmv_f7aLd0GrG5hUccDlTdPCEklvQeP9nIEZqv OPy6RwATC6wnGkKQseChbiXzfsybZbyNpXc6tfzCjki99l23c44E9ukJdbDmWKNQ95ga73oghi.I 97wQS8b3Vz9_x5Eh6yqw55CUvejzxvwFeM8DH4cskesjYGhgQQb2Vjr.AiPZeOu5d8umJZjTZG3g mcuTqSUCqRUF5C62h4Khc9AWYp57Mr59cTTFXwlCrSyYJFEp9l90dhncXdL4S.26.0SQ0vJvKhBZ X3BpqbjCVSdFOhNyzOnCp2_BrmCagUDAUATKCuedlydlI68tUQ_OkkkIHvOqoXSAO7meALGjHMsP OMISiC2VQSlwwKmGIDOFLJsDqTl6SLV1vDZ2r1nALsat6ul2TGkpmvM_q9AGMorgiS3LRghQWAvI z4EhmII8xNvwUT8cxPFrX06Yhfll.WNp7qiY6pMIb_ZkuZLaHhKochdff.I9l8U6QToEgzG0AEKD X1nwNxGlfh5jUxtNLWD267If67nf456b57TzIDkE1KOIbHMfgw4SLofRbwDWkPsZglTDkBaBnCWr 1advyz4RlnpkNGQ9QV.pBaXmwhD6r72hh8fiCGsLBbA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Fri, 24 Jan 2020 05:34:33 +0000 Received: by smtp432.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5154e0a93daa76c8f17f548eb900f9b7; Fri, 24 Jan 2020 05:34:30 +0000 (UTC) Date: Fri, 24 Jan 2020 13:34:23 +0800 From: Gao Xiang To: Eric Biggers Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Alexander Viro , Daniel Rosenberg , Gabriel Krisman Bertazi Subject: Re: [PATCH] ext4: fix race conditions in ->d_compare() and ->d_hash() Message-ID: <20200124053415.GC31271@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20200124041234.159740-1-ebiggers@kernel.org> <20200124050423.GA31271@hsiangkao-HP-ZHAN-66-Pro-G1> <20200124051601.GB832@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200124051601.GB832@sol.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailer: WebService/1.1.14873 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) Content-Length: 477 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jan 23, 2020 at 09:16:01PM -0800, Eric Biggers wrote: [] > So we need READ_ONCE() to ensure that a consistent value is used. By the way, my understanding is all pointer could be accessed atomicly guaranteed by compiler. In my opinion, we generally use READ_ONCE() on pointers for other uses (such as, avoid accessing a variable twice due to compiler optimization and it will break some logic potentially or need some data dependency barrier...) Thanks, Gao Xiang