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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Feb 2024 16:33:33 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Simon Horman <horms@...nel.org>
Cc: Diogo Ivo <diogo.ivo@...mens.com>, danishanwar@...com,
	rogerq@...nel.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, andrew@...n.ch, vigneshr@...com,
	jan.kiszka@...mens.com, robh@...nel.org, grygorii.strashko@...com,
	linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: ti: icssg-prueth: Remove duplicate cleanup
 calls in emac_ndo_stop()

On Thu, Feb 08, 2024 at 10:47:00AM +0000, Simon Horman wrote:
> On Tue, Feb 06, 2024 at 03:20:51PM +0000, Diogo Ivo wrote:
> > Remove the duplicate calls to prueth_emac_stop() and
> > prueth_cleanup_tx_chns() in emac_ndo_stop().
> > 
> > Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
> > Fixes: 186734c15886 ("net: ti: icssg-prueth: add packet timestamping and ptp support")
> > Signed-off-by: Diogo Ivo <diogo.ivo@...mens.com>
> 
> Hi Doigo,
> 
> I see that there are indeed duplicate calls,
> but I do wonder if this is a cleanup rather than a bug:
> is there a user-visible problem that this addresses?
> 
> If so, I think it would be good to spell this out in the commit message.
> 
> ...

So far as I can see from reviewing the code there is no user visible
effect.

rproc_shutdown() calls rproc_stop() which sets "rproc->state = RPROC_OFFLINE;"
so the second call will return be a no-op and return -EINVAL.  But the
return value is not checked so no problem.

prueth_cleanup_tx_chns() uses memset to zero out the emac->tx_chns[] so
the second call will be a no-op.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ