[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250730181249.78dbe4f2@kernel.org>
Date: Wed, 30 Jul 2025 18:12:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: airoha: Fix PPE table access in
airoha_ppe_debugfs_foe_show()
On Mon, 28 Jul 2025 13:58:08 +0200 Lorenzo Bianconi wrote:
> +struct airoha_foe_entry *
> +airoha_ppe_foe_get_entry_locked(struct airoha_ppe *ppe, u32 hash)
Hm, could be just me, but the way we/I used _locked in the core was
the opposite. _locked means the caller's already taken the lock.
Here you seem to be saying that the "callee is locked"..
Can we stick to core's interpretation?
> + struct airoha_foe_entry *hwe;
> +
> + spin_lock_bh(&ppe_lock);
> + hwe = airoha_ppe_foe_get_entry(ppe, hash);
> + spin_unlock_bh(&ppe_lock);
> +
> + return hwe;
Is the lifetime of the hwe object somehow guaranteed in the debugfs
code? Looks questionable..
--
pw-bot: cr
Powered by blists - more mailing lists