lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1268174479.21081.1764137823922.JavaMail.zimbra@couthit.local>
Date: Wed, 26 Nov 2025 11:47:03 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Parvathi Pudi <parvathi@...thit.com>, andrew+netdev <andrew+netdev@...n.ch>, 
	davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>, 
	pabeni <pabeni@...hat.com>, danishanwar <danishanwar@...com>, 
	rogerq <rogerq@...nel.org>, pmohan <pmohan@...thit.com>, 
	basharath <basharath@...thit.com>, afd <afd@...com>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	netdev <netdev@...r.kernel.org>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	ALOK TIWARI <alok.a.tiwari@...cle.com>, horms <horms@...nel.org>, 
	pratheesh <pratheesh@...com>, j-rameshbabu <j-rameshbabu@...com>, 
	Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>, 
	srk <srk@...com>, rogerq <rogerq@...com>, 
	krishna <krishna@...thit.com>, mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v6 2/3] net: ti: icssm-prueth: Adds switchdev
 support for icssm_prueth driver

Hi,

> On Mon, 24 Nov 2025 19:25:11 +0530 Parvathi Pudi wrote:
>> Subject: [PATCH net-next v6 2/3] net: ti: icssm-prueth: Adds switchdev support
>> for icssm_prueth driver
> 
> Adds -> Add
> 
>> This patch adds support for offloading the RSTP switch feature to the
> 
> s/This patch adds/Add/
> 
> imperative mood, please..
> 

Sure, we will address this in the next version.

>> +static void icssm_prueth_sw_fdb_work(struct work_struct *work)
>> +{
>> +	struct icssm_prueth_sw_fdb_work *fdb_work =
>> +		container_of(work, struct icssm_prueth_sw_fdb_work, work);
>> +	struct prueth_emac *emac = fdb_work->emac;
>> +
>> +	rtnl_lock();
>> +
>> +	/* Interface is not up */
>> +	if (!emac->prueth->fdb_tbl)
>> +		goto free;
>> +
>> +	switch (fdb_work->event) {
>> +	case FDB_LEARN:
>> +		icssm_prueth_sw_insert_fdb_entry(emac, fdb_work->addr, 0);
>> +		break;
>> +	case FDB_PURGE:
>> +		icssm_prueth_sw_do_purge_fdb(emac);
>> +		break;
>> +	default:
>> +		break;
>> +	}
>> +
>> +free:
>> +	rtnl_unlock();
>> +	kfree(fdb_work);
>> +	dev_put(emac->ndev);
> 
> please use netdev_put() and a netdev tracker
> 

We will replace dev_put() with netdev_put() as shown below and
add a netdevice_tracker to the icssm_prueth_sw_fdb_work struct.

"netdev_put(emac->ndev, &fdb_work→ndev_tracker);"

We will address this in the next version.

>> +}
>> +
>> +int icssm_prueth_sw_learn_fdb(struct prueth_emac *emac, u8 *src_mac)
>> +{
>> +	struct icssm_prueth_sw_fdb_work *fdb_work;
>> +
>> +	fdb_work = kzalloc(sizeof(*fdb_work), GFP_ATOMIC);
>> +	if (WARN_ON(!fdb_work))
>> +		return -ENOMEM;
>> +
>> +	INIT_WORK(&fdb_work->work, icssm_prueth_sw_fdb_work);
>> +
>> +	fdb_work->event = FDB_LEARN;
>> +	fdb_work->emac  = emac;
>> +	ether_addr_copy(fdb_work->addr, src_mac);
>> +
>> +	dev_hold(emac->ndev);
> 
> same here.
> 
> This significantly helps debugging in case some code leaks a reference.
> --
> pw-bot: cr


Here as well, we will replace dev_hold() with netdev_hold() as shown below
and will address this in next version.

"netdev_hold(emac->ndev, &fdb_work->ndev_tracker, GFP_ATOMIC);"


Thanks and Regards,
Parvathi.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ