Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2041818rwb; Thu, 17 Nov 2022 05:55:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ZYIiD0imphN3mjlVsVlgdUMuwHcb69VX0/A6cMoKa/xvRZ5QsLI2LiM1WojTWnQlfVj3s X-Received: by 2002:a17:906:6717:b0:78d:7a4c:13ea with SMTP id a23-20020a170906671700b0078d7a4c13eamr2205506ejp.471.1668693338808; Thu, 17 Nov 2022 05:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668693338; cv=none; d=google.com; s=arc-20160816; b=rBkVJ8UE6S5UpGA+5cJwNR3uUuwjzHX2Ww5oY+CL8g/SWSCia3PTKaZwVigsQAuZop SOkxy6e4x9RIKnfuIYLTEjZ4LQXq9ecPnDVMx8hBNhGZHOQStGhyE4wLYZcQh7CaGuvv wVKEU+8+lVDNPvzF3lnX6IP7rf3g8jXwhF+CESku3xK3In6k3faaY7t2TtuUseETR0Wd z7JeidGD1gq9zrRN1LTMXveXIiwCOmov6frYZrc0sQUHlZfJgM52NFMmFo1RWgPm6iXU 49ujol/5YNg1GgqZvfLBIM5cKtmF/JWNzEaYyS7ndBLq/0oko1fI3oXkPZiuYV+Gbq/T dxhw== 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=9uTDN8yDdd59yB3p902edftBDL/evWgAWIO0a4zUQ4Y=; b=sgEZscANM07yiiz0SWshB6sdcdCv1DASoCBFQrllU2C7c+CJB+/cz0fN+ygmS9WSak LWSC2AcgBRwCFZnlwW+7RNLKOG/GAurotP9gQIjUhu/p3qVcPejPp77YCxeYfAw+zKQs YXj2Fqo1E4QjTpRQEM5O6/hOmvdVwN7NKZo6E1di+8PcAuy6oHTFt7LSOavQhw0zQ6id Dnan1NMvHcoeZRvC+9ChzjCvjlxEsF4RUO7DKCjFAwiw305wLz0HKGKizfcPj4chOpJF Nq4TVOks0p0z4JyJla2+aFl5qVnmNMweWj2IPjnw4MUg0/MbdC7mstrB/hTO5+EVqcnq MIsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aIm+I6xY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc1-20020a170907074100b007ae0e8f697fsi574546ejb.652.2022.11.17.05.55.13; Thu, 17 Nov 2022 05:55:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aIm+I6xY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240288AbiKQNyA (ORCPT + 99 others); Thu, 17 Nov 2022 08:54:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240264AbiKQNxy (ORCPT ); Thu, 17 Nov 2022 08:53:54 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0A4419B8 for ; Thu, 17 Nov 2022 05:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668693174; 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=9uTDN8yDdd59yB3p902edftBDL/evWgAWIO0a4zUQ4Y=; b=aIm+I6xY2gAMDnZIxOASb5ENGOfEHUPpUdaOUP/npv09dw+uuC2FGrPJxcYrbFV8j7jg3R XyYdPoGnsnE6vi1JwwMB/aKWKl1FvSaGdT+nArcnJRSia+67iO2foBKy2vOeZNss172Vju sBoEyFrgFMCL4hNPtzmyYNy+waWOHmA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-151-K-Id08TtP4G3Hf4UKLQS3A-1; Thu, 17 Nov 2022 08:52:51 -0500 X-MC-Unique: K-Id08TtP4G3Hf4UKLQS3A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C5A7E3810D40; Thu, 17 Nov 2022 13:52:50 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12734C1E87F; Thu, 17 Nov 2022 13:52:49 +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: <20221117115023.1350181-2-dwysocha@redhat.com> References: <20221117115023.1350181-2-dwysocha@redhat.com> <20221117115023.1350181-1-dwysocha@redhat.com> To: Dave Wysochanski Cc: dhowells@redhat.com, Daire Byrne , Benjamin Maynard , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/1] fscache: Fix oops due to race with cookie_lru and use_cookie MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3716829.1668693167.1@warthog.procyon.org.uk> Date: Thu, 17 Nov 2022 13:52:47 +0000 Message-ID: <3716830.1668693167@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-nfs@vger.kernel.org Dave Wysochanski wrote: > + clear_bit(FSCACHE_COOKIE_DO_LRU_DISCARD, &cookie->flags); Actually, can you do test_and_clear_bit() and then log a trace point, say: fscache_see_cookie(cookie, fscache_cookie_see_lru_discard_cancel); if the bit was set. David