netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Parvathi Pudi <parvathi@couthit.com>
To: Simon Horman <horms@kernel.org>
Cc: Parvathi Pudi <parvathi@couthit.com>,
	andrew+netdev <andrew+netdev@lunn.ch>,
	 davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
	 kuba <kuba@kernel.org>, pabeni <pabeni@redhat.com>,
	 danishanwar <danishanwar@ti.com>, rogerq <rogerq@kernel.org>,
	 pmohan <pmohan@couthit.com>, basharath <basharath@couthit.com>,
	 afd <afd@ti.com>, linux-kernel <linux-kernel@vger.kernel.org>,
	 netdev <netdev@vger.kernel.org>,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	 ALOK TIWARI <alok.a.tiwari@oracle.com>,
	pratheesh <pratheesh@ti.com>,  j-rameshbabu <j-rameshbabu@ti.com>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	praneeth <praneeth@ti.com>,  srk <srk@ti.com>,
	rogerq <rogerq@ti.com>,  krishna <krishna@couthit.com>,
	mohan <mohan@couthit.com>
Subject: Re: [PATCH net-next v5 2/3] net: ti: icssm-prueth: Adds switchdev support for icssm_prueth driver
Date: Thu, 20 Nov 2025 11:52:37 +0530 (IST)	[thread overview]
Message-ID: <1902810966.5288.1763619757671.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <aRuOzelPTiwaoNop@horms.kernel.org>

Hi,

> On Thu, Nov 13, 2025 at 03:40:22PM +0530, Parvathi Pudi wrote:
> 
> ...
> 
>> @@ -222,12 +229,14 @@ struct prueth_emac {
>>  	const char *phy_id;
>>  	u32 msg_enable;
>>  	u8 mac_addr[6];
>> +	unsigned char mc_filter_mask[ETH_ALEN]; /* for multicast filtering */
>>  	phy_interface_t phy_if;
>>  
>>  	/* spin lock used to protect
>>  	 * during link configuration
>>  	 */
>>  	spinlock_t lock;
>> +	spinlock_t addr_lock;   /* serialize access to VLAN/MC filter table */
> 
> addr_lock does not appear to be initialised anywhere.
> 
> ...
> 

Sure, we will address this in next version.


>> +static int icssm_prueth_switchdev_obj_del(struct net_device *ndev,
>> +					  const void *ctx,
>> +					  const struct switchdev_obj *obj)
>> +{
>> +	struct switchdev_obj_port_mdb *mdb = SWITCHDEV_OBJ_PORT_MDB(obj);
>> +	struct prueth_emac *emac = netdev_priv(ndev);
>> +	struct prueth *prueth = emac->prueth;
>> +	struct netdev_hw_addr *ha;
>> +	u8 hash, tmp_hash;
>> +	int ret = 0;
>> +
>> +	switch (obj->id) {
>> +	case SWITCHDEV_OBJ_ID_HOST_MDB:
>> +		dev_dbg(prueth->dev, "MDB del: %s: vid %u:%pM  port: %x\n",
>> +			ndev->name, mdb->vid, mdb->addr, emac->port_id);
>> +		hash = icssm_emac_get_mc_hash(mdb->addr, emac->mc_filter_mask);
>> +		netdev_for_each_mc_addr(ha, prueth->hw_bridge_dev) {
> 
> Is there anything stopping this event from occurring when
> the port is not the lower device of a bridge - before being added
> or after being removed?
> 
> If not, then passing prueth->hw_bridge_dev to netdev_for_each_mc_addr()
> will result in a null pointer dereference.
> 
> ...

Sure, we’ll verify the code and add the appropriate conditional
checks to ensure "prueth->hw_bridge_dev" is valid before using it.
This will be addressed in the next version.

Thanks and Regards,
Parvathi.


  reply	other threads:[~2025-11-20  6:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 10:10 [PATCH net-next v5 0/3] STP/RSTP SWITCH support for PRU-ICSSM Ethernet driver Parvathi Pudi
2025-11-13 10:10 ` [PATCH net-next v5 1/3] net: ti: icssm-prueth: Adds helper functions to configure and maintain FDB Parvathi Pudi
2025-11-17 21:07   ` Simon Horman
2025-11-20  6:20     ` Parvathi Pudi
2025-11-13 10:10 ` [PATCH net-next v5 2/3] net: ti: icssm-prueth: Adds switchdev support for icssm_prueth driver Parvathi Pudi
2025-11-17 21:08   ` Simon Horman
2025-11-20  6:22     ` Parvathi Pudi [this message]
2025-11-13 10:10 ` [PATCH net-next v5 3/3] net: ti: icssm-prueth: Adds support for ICSSM RSTP switch Parvathi Pudi
2025-11-17 21:09   ` Simon Horman
2025-11-20  6:25     ` Parvathi Pudi

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=1902810966.5288.1763619757671.JavaMail.zimbra@couthit.local \
    --to=parvathi@couthit.com \
    --cc=afd@ti.com \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=basharath@couthit.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=j-rameshbabu@ti.com \
    --cc=krishna@couthit.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmohan@couthit.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    /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).