[PATCH net] net: airoha: Fix PPE table access in airoha_ppe_debugfs_foe_show()
Jakub Kicinski
kuba at kernel.org
Wed Jul 30 18:12:49 PDT 2025
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
More information about the Linux-mediatek
mailing list