Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp450993pxb; Wed, 25 Aug 2021 07:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy322tk4sF/UrU9zOEkath76o292x5IgJi94Bv37MyVxYl8DNJwc1i24kPXrILFsSojrsxN X-Received: by 2002:a5d:85cf:: with SMTP id e15mr35855185ios.208.1629900398657; Wed, 25 Aug 2021 07:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629900398; cv=none; d=google.com; s=arc-20160816; b=BiMYSPmEicqhfoN4mT/fMvQrTlUti9okc3NjxLyI1zt80ZwuTGr9PBnkfOZlYBi9Qo AkY/HHnVEB+cmFYJa0YZFgbQaL/7IVJ+QihnrtXozJnNm6jHAHYf26zUqJNLmO9uDPCw 8WuPF1WnkxVsg4VCtTgUi9OwbNOmlS+ewZUrfqeeq3NmNTP0JcFqySMD19G3SANDZR8e YE9GA+aHA3nO3fcEArWLywwoS9yahvcTIDvxDC14llrApUHs8gp3VN7+Ehq/h6ErTaO9 3xDref9+gmAdiQ4FNY3HiVfSnIjuAf3rTHnqhTljPSNvr1Xs8CDUodZgrvBfaNOjM6Rv 8pkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=ye7x7ROLpLa4uVII3MBvGoJurLkOurh44zhhrnNWmF8=; b=HejKLE6XpL1Rxva3fLldTcM+udJ9IBMuyTGUogA7Wwall99f92fQd9bnHIHCm4l+30 8Ww1SFo9qD5Myjydkd7VqC+mCxYYvvZuZpVeFTW8DaIdeyRZ7iuyo/IKzuPUoysn73Pi RlKhjaKJuEX+9gXRNs0lXP7Z9+czWJyHaeKh+fcz+gmO75P326e1ADYBNDoBOrOh3iGd DtoWgekmZ7WOAjK73euVr0QF5wTrILDrDFi6La0M4CtHl4V/LAPsbo/LkDijEOgulcY7 xeXIhc5Hj4AKbRggJAITsD11CME6HVp0HMNxlzCK4J7YCt14KGJMxWjoHPS3B3pl3Zej 7dpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PlSp3elj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si15836434iot.49.2021.08.25.07.06.23; Wed, 25 Aug 2021 07:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PlSp3elj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238092AbhHYOGp (ORCPT + 99 others); Wed, 25 Aug 2021 10:06:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34660 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbhHYOGp (ORCPT ); Wed, 25 Aug 2021 10:06:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629900358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ye7x7ROLpLa4uVII3MBvGoJurLkOurh44zhhrnNWmF8=; b=PlSp3eljiYjbFR7oDHpakV0l/I8O/eoK74I2CKLUu8qKqMPDq0e73IbwyW505RgkDNtDxP 06uKZKZMkgo89yLbNGd6kzixho25gTB5bo6bzCJpEUTIsGCws9W35Yn3yfiEvnPlu00tyy n5/vTLkH6MaBuSKFD4kqyw66Yyj/WNY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-562-8zB0ShKZMiSW63FKSCZu_g-1; Wed, 25 Aug 2021 10:05:57 -0400 X-MC-Unique: 8zB0ShKZMiSW63FKSCZu_g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3302B101C8AE; Wed, 25 Aug 2021 14:05:56 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id A820060C04; Wed, 25 Aug 2021 14:05:52 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <6370d0a74c3ceb79c53305a64ba7a982d16d34b4.camel@redhat.com> References: <6370d0a74c3ceb79c53305a64ba7a982d16d34b4.camel@redhat.com> <162431188431.2908479.14031376932042135080.stgit@warthog.procyon.org.uk> <162431203107.2908479.3259582550347000088.stgit@warthog.procyon.org.uk> To: Jeff Layton Cc: dhowells@redhat.com, linux-cachefs@redhat.com, Anna Schumaker , Steve French , Dominique Martinet , David Wysochanski , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/12] fscache: Fix fscache_cookie_put() to not deref after dec MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2030918.1629900351.1@warthog.procyon.org.uk> Date: Wed, 25 Aug 2021 15:05:51 +0100 Message-ID: <2030919.1629900351@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Jeff Layton wrote: > > fscache_cookie_put() accesses the cookie it has just put inside the > > tracepoint that monitors the change - but this is something it's not > > allowed to do if we didn't reduce the count to zero. > > Do you mean "if the count went to zero." ? No. If *we* reduced the count to zero, it falls to us to destroy the object, so we're allowed to look into it again. If we didn't reduce the count to zero, then someone else might destroy it before we look into it again. David