Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp652451rwl; Thu, 30 Mar 2023 23:52:08 -0700 (PDT) X-Google-Smtp-Source: AKy350YoytvqhC8HPQ34gB97tCzOJF6FAQD0RxQ7+1RPuyOZSbasE+GKddi99t9vNI7cvqa082qo X-Received: by 2002:a17:906:3f4f:b0:931:4285:ea1d with SMTP id f15-20020a1709063f4f00b009314285ea1dmr3889958ejj.5.1680245527811; Thu, 30 Mar 2023 23:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680245527; cv=none; d=google.com; s=arc-20160816; b=qax29xLfm0NIhBoBNV/JwNDVoYmBEz3cvleuRJTKDdEoaHcLh5GJ4DDL3qvIayofQe OI7fdLXEjRc9itNQ/Ummnr36zrFcJGxPZuP6XXirugmkPsUJfuxwWyjuxr9hgD8eExHD jzeIEGcuNh+/VrCwOaAzpyqh4LCLqKkaRyTelOF+TIYswfWVxK56CAiqnC5tSdnrnSgc SreHrzola/xv/tgZdmjxXstLhTMNlLm6C3g9scPtlt4nwH13YpnGK88/2lQ0gDWFiWWR bzoGc8oXUTE0ZJ3iMNt45+T8fqWhyPrKWRJRjOrPaBlkLoLCCc+q8pbtkijxVyOCJYQy b8zA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hDyFwlAp3Fo/ZThApN5PYrXbiLuOXpP1xM5ZoxYtZSg=; b=IIAiZ5T87ofpdrqrU6Bf4wDciibUd3UYodoF1ocU1VFa/YF49xPi4c4yL9QIePiKra rEQ6VnqwTjCxLMt9Fa289XqiaIi/JDKLsVWFAVumNNkK8KTCYzQq1wctxH9ZY/vhZ23j XnH8SzMAiwct85XrsVNexqumOGKfAbHuwSo0pwlZnAs37tJxw2xJxS45Qd3fj9NcEmNd BdWY+yyObduqoi4K/H7jzlsbLXORP2oTAIi6FGcdxMYsc9q5NPp6VijtQrKTlKrunQ3t IY7OATOMPIUbXXzNHBxygbq4AynZEY/4Rap4gnw4nZbSbX5IA7Y4VqmsOSNp74pHCS4x YSTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bYlMcsP8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kj23-20020a170907765700b00939c395018esi1308515ejc.474.2023.03.30.23.51.42; Thu, 30 Mar 2023 23:52:07 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bYlMcsP8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbjCaGuO (ORCPT + 99 others); Fri, 31 Mar 2023 02:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbjCaGuN (ORCPT ); Fri, 31 Mar 2023 02:50:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62971BC3; Thu, 30 Mar 2023 23:50:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 772D162375; Fri, 31 Mar 2023 06:50:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D9B8C433D2; Fri, 31 Mar 2023 06:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680245410; bh=rhyBsElZo0Ta67fGA+xvuCeA4z94ImcI9RFKEh/mtpQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bYlMcsP82q/ZpCZExmr4gv9Yq3dFCE+ZMjWCfOQXzwQpP+xqz8teACYe5wQYouhQF Zyl544dWDDO58wE8jxFZlymWXu6DzoJw5HgriP11OIQ1DAyJRi+uVeek3pJ3sd8T2X ZpMW7jryQTikQgasYqu9S7HZ6OxDsympkyEicjHfHk3WJaQXXHS6ci/3OWNj1xdWeY 7UX0oyylKiklREh9+jLqXgw1Wlsz98LrZGDegBPIHBo6Gl1GQmpmAI+3CDVZ2uX8H5 YwRE5cOKtJo518oJusAErv9ebYwr/RGqB8bSFTDMPrDFLtwWRKPO8ZBJkkP28qB2A5 50Xb0j6F9F+7w== Date: Thu, 30 Mar 2023 23:50:09 -0700 From: Jakub Kicinski To: Wolfram Sang Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Steve Glendinning , "David S. Miller" , Eric Dumazet , Paolo Abeni , Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: Re: [PATCH net v4] smsc911x: only update stats when interface is up Message-ID: <20230330235009.4b6d4b8e@kernel.org> In-Reply-To: References: <20230329064010.24657-1-wsa+renesas@sang-engineering.com> <20230329123958.045c9861@kernel.org> <20230329131724.4484a881@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Fri, 31 Mar 2023 08:33:24 +0200 Wolfram Sang wrote: > > Okay, core changes aside - does pm_runtime_put() imply an RCU sync? > > Otherwise your check in get_stats is racy... > > From some light research, I can't find a trace of RCU sync. Pity, I'll > need to move furhter investigation to later. I'll report back if I have > something, but it may take a while. Thanks for the help! If you don't want to spend too much time you can just call it yourself right? :) Put a synchronize_rcu() with a comment about concurrent stat reading after pdata->is_open = false; and that's it?