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]
Message-ID: <ae8d43993c2195925c9cbb4a9db565985709eaf8.camel@siemens.com>
Date: Fri, 13 Sep 2024 16:16:57 +0000
From: "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>
To: "olteanv@...il.com" <olteanv@...il.com>
CC: "andrew@...n.ch" <andrew@...n.ch>, "davem@...emloft.net"
	<davem@...emloft.net>, "f.fainelli@...il.com" <f.fainelli@...il.com>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net: dsa: lan9303: avoid dsa_switch_shutdown()

Hi Vladimir!

Thank you for the quick fix!

On Thu, 2024-09-12 at 13:15 +0300, Vladimir Oltean wrote:
> > From: Alexander Sverdlin <alexander.sverdlin@...mens.com>
> > 
> > dsa_switch_shutdown() doesn't bring down any ports, but only disconnects
> > slaves from master. Packets still come afterwards into master port and the
> > ports are being polled for link status. This leads to crashes:
> > 
> > Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
> > CPU: 0 PID: 442 Comm: kworker/0:3 Tainted: G O 6.1.99+ #1
> > Workqueue: events_power_efficient phy_state_machine
> > pc : lan9303_mdio_phy_read
> > lr : lan9303_phy_read
> > Call trace:
> >   lan9303_mdio_phy_read
> >   lan9303_phy_read
> >   dsa_slave_phy_read
> >   __mdiobus_read
> >   mdiobus_read
> >   genphy_update_link
> >   genphy_read_status
> >   phy_check_link_status
> >   phy_state_machine
> >   process_one_work
> >   worker_thread
> > 
> > Call lan9303_remove() instead to really unregister all ports before zeroing
> > drvdata and dsa_ptr.
> > 
> > Fixes: 0650bf52b31f ("net: dsa: be compatible with masters which unregister on shutdown")

Do you think it would make sense to add the same Fixes: tag as above?
(That's the earlier one of the two)

> > Cc: stable@...r.kernel.org
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...mens.com>
> > ---
> 
> Could you please test this alternative solution (patch attached) for both reported problems?

We had two LAN9303-equipped systems running overnight with PROVE_LOCKING+PROVE_RCU and without,
and I also ran couple of reboots with PROVE_LOCKING on a Marvell mv6xxx equipped HW.
All of the above for a backport to v6.1, but this part should be OK, I believe.

Overall looks very good, you can add my
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@...mens.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@...mens.com> 
when you officially publish the patch.

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ