[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b647d3c2-171e-43ea-9329-ea37093f5dec@lunn.ch>
Date: Sat, 15 Mar 2025 14:58:18 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: airoha: Validate egress gdm port in
airoha_ppe_foe_entry_prepare()
> Fix the issue validating egress gdm port in airoha_ppe_foe_entry_prepare
> routine.
A more interesting question is, why do you see an invalid port? Is the
hardware broken? Something not correctly configured? Are you just
papering over the crack?
> -static int airoha_ppe_foe_entry_prepare(struct airoha_foe_entry *hwe,
> +static int airoha_ppe_foe_entry_prepare(struct airoha_eth *eth,
> + struct airoha_foe_entry *hwe,
> struct net_device *dev, int type,
> struct airoha_flow_data *data,
> int l4proto)
> @@ -224,6 +225,11 @@ static int airoha_ppe_foe_entry_prepare(struct airoha_foe_entry *hwe,
> if (dev) {
> struct airoha_gdm_port *port = netdev_priv(dev);
If port is invalid, is dev also invalid? And if dev is invalid, could
dereferencing it to get priv cause an opps?
Andrew
Powered by blists - more mailing lists