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: <20221105163751.it2mxwobzhqwtyr4@skbuf>
Date:   Sat, 5 Nov 2022 18:37:51 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     piergiorgio.beruto@...il.com
Cc:     netdev@...r.kernel.org
Subject: Re: Potential issue with PHYs connected to the same MDIO bus and
 different MACs

On Sat, Nov 05, 2022 at 03:39:07PM +0100, piergiorgio.beruto@...il.com wrote:
>    priv->phylink_config.dev = &pdev->dev;
>    priv->phylink_config.type = PHYLINK_NETDEV;

The problem is here. You think that &pdev->dev is the same as
&ndev->dev, but it isn't (and it's SET_NETDEV_DEV that makes the linkage
between the 2). Use &ndev->dev here, and check out how phylink uses the
"dev" field:

#define to_net_dev(d) container_of(d, struct net_device, dev)

	if (config->type == PHYLINK_NETDEV) {
		pl->netdev = to_net_dev(config->dev);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ