linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH net-next] net: ethernet: mtk_wed: annotate RCU release in attach()
Date: Fri, 25 Apr 2025 11:20:50 +0100	[thread overview]
Message-ID: <20250425102050.GO3042781@horms.kernel.org> (raw)
In-Reply-To: <20250423150811.456205-2-johannes@sipsolutions.net>

On Wed, Apr 23, 2025 at 05:08:08PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> There are some sparse warnings in wifi, and it seems that
> it's actually possible to annotate a function pointer with
> __releases(), making the sparse warnings go away. In a way
> that also serves as documentation that rcu_read_unlock()
> must be called in the attach method, so add that annotation.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>

Thinking out loud:

* Without this patch I see the following, but with this patch I do not.

  .../mt7915/mmio.c:636:5: warning: context imbalance in 'mt7915_mmio_wed_init' - wrong count at exit
  .../mt7996/mmio.c:302:5: warning: context imbalance in 'mt7996_mmio_wed_init' - wrong count at exit

* The only implementation of this callback I found is mtk_wed_attach
  which is already annotated as __releases(RCU);

* The only caller of this callback I could find is mtk_wed_device_attach()
  which takes rcu_read_unlock(). And the the callback needs to release it
  to avoid imbalance.


  reply	other threads:[~2025-04-25 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 15:08 [PATCH net-next] net: ethernet: mtk_wed: annotate RCU release in attach() Johannes Berg
2025-04-25 10:20 ` Simon Horman [this message]
2025-04-25 10:22   ` Johannes Berg
2025-04-25 19:01 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250425102050.GO3042781@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).