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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8fe1d9da-40cc-4537-80ce-6a2855c2dec4@redhat.com>
Date: Thu, 5 Sep 2024 12:27:43 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Rosen Penev <rosenp@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 linux-kernel@...r.kernel.org, jacob.e.keller@...el.com, horms@...nel.org,
 sd@...asysnail.net, chunkeey@...il.com
Subject: Re: [PATCHv2 net-next 8/8] net: ibm: emac: remove all waiting code

On 9/3/24 21:42, Rosen Penev wrote:
[...]
>   static int emac_wait_deps(struct emac_instance *dev)

Possibly rename the function to something else, as it does not wait anymore?

> @@ -2419,26 +2397,25 @@ static int emac_wait_deps(struct emac_instance *dev)
>   		deps[EMAC_DEP_MDIO_IDX].phandle = dev->mdio_ph;
>   	if (dev->blist && dev->blist > emac_boot_list)
>   		deps[EMAC_DEP_PREV_IDX].phandle = 0xffffffffu;
> -	bus_register_notifier(&platform_bus_type, &emac_of_bus_notifier);
> -	wait_event_timeout(emac_probe_wait,
> -			   emac_check_deps(dev, deps),
> -			   EMAC_PROBE_DEP_TIMEOUT);
> -	bus_unregister_notifier(&platform_bus_type, &emac_of_bus_notifier);
> -	err = emac_check_deps(dev, deps) ? 0 : -ENODEV;
> +
> +	err = emac_check_deps(dev, deps);
> +	if (err)
> +		return err;
> +
>   	for (i = 0; i < EMAC_DEP_COUNT; i++) {
>   		of_node_put(deps[i].node);
> -		if (err)
> -			platform_device_put(deps[i].ofdev);
> -	}
> -	if (err == 0) {
> -		dev->mal_dev = deps[EMAC_DEP_MAL_IDX].ofdev;
> -		dev->zmii_dev = deps[EMAC_DEP_ZMII_IDX].ofdev;
> -		dev->rgmii_dev = deps[EMAC_DEP_RGMII_IDX].ofdev;
> -		dev->tah_dev = deps[EMAC_DEP_TAH_IDX].ofdev;
> -		dev->mdio_dev = deps[EMAC_DEP_MDIO_IDX].ofdev;
> +		platform_device_put(deps[i].ofdev);

I'm likely lost, but AFAICS after the patch, on success 
platform_device_put() is invoked unconditionally on each deps[] entry, 
while before it was called only on failure?!?

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ