From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67BDF2FFDC4; Fri, 17 Apr 2026 17:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776448018; cv=none; b=BKwZQneNI4xoh4J/hkW6Z8p6zpW+uTgQqzPdMxfIuFtaIIULff9iGExxiIC96LXjk/LxNcYicOuZ5OE6dldlJ3unjx+6SColCWX43deqhvt1XBR2bSZzKhbA71h7LJyJElsqSzmDdWeKe7aTOQSpTCPRUi+d179uP7EOZL+Fn3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776448018; c=relaxed/simple; bh=LqpISmas26GAA+eigkPeHlqbzpTvgtAgzvLgkNHtNUY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Maq49Xp7xfzGlXi+ftk3YIsxlzwYAs0X5HcTgVFe4OZ2HeDmuVyFNrndmHWs99AtLf0HmzEd+Ui6crGejOGuxw5NdvWrZ3c+e1C2X5a+SwrOxw3B0GwbXFebi40H9jmmU6lN3y7qT+q7sDldxJ064cFGVGp2LlfPqP90KVvakyE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=G8ioTg1P; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="G8ioTg1P" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=k8m/KTTmnq5PY9ru1DsdH08IpJYZRyWyKs1/HT27WEs=; b=G8ioTg1PqKwL/Klcpomt6dE9Xa JPpL9IJjXkGPag8r3o9xajKGIy4+9OeXkj2D8YjNECvgQYyIqbGBNLkfK8n0v2zLaNpkkzbUeWsIO UdQ7d8v4rw1Tr9oyOhpJcCg2Is/sNrdSW4x9Tl3TeSuoaCOxBHZbd+3k5tlxVQdswdWacHoXN71uh uO3smsPJZN8s46HtaAOfNz6/wHDxoox2OaYKSBtgqw3khAoHH6vZ2xn7YAMFylVphR5FxO6N7ya/A EgTsq2S/5sPLv3+4mXLX6Jn1Tg0EvE9JbVMvk5LXYzKaqRYWvmB2KYPhd1F1GQxm7Fpa772McW2xo klQbWTaQ==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wDnH2-00FY4p-1L; Fri, 17 Apr 2026 17:46:36 +0000 Date: Fri, 17 Apr 2026 10:46:29 -0700 From: Breno Leitao To: Daniel Golle Cc: "Chester A. Unal" , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , Christian Marangi , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Frank Wunderlich , John Crispin Subject: Re: [PATCH net] net: dsa: mt7530: fix .get_stats64 sleeping in atomic context Message-ID: References: <79dc0ec5b6be698b14cb66339d6f63033ca2934a.1776397542.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79dc0ec5b6be698b14cb66339d6f63033ca2934a.1776397542.git.daniel@makrotopia.org> X-Debian-User: leitao On Fri, Apr 17, 2026 at 04:55:57AM +0100, Daniel Golle wrote: > @@ -3404,6 +3449,9 @@ EXPORT_SYMBOL_GPL(mt7530_probe_common); > void > mt7530_remove_common(struct mt7530_priv *priv) > { > + if (priv->bus) > + cancel_delayed_work_sync(&priv->stats_work); > + Shouldn't you cancel the work later, after dsa_unregister_switch()? I am wondering if the following race cannot happen: mt7530_remove_common() someone reading /proc/net/dev cancel_delayed_work_sync() /* returns: work neither pending nor executing - true at this instant */ mt7530_get_stats64() mod_delayed_work(...) /* work is queued again */ dsa_unregister_switch() return