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:   Sat, 22 Jan 2022 16:54:45 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Sergei Trofimovich <slyich@...il.com>
Cc:     Stephen Hemminger <stephen@...workplumber.org>,
        netdev@...r.kernel.org
Subject: Re: atl1c drivers run 'napi/eth%d-385' named threads with
 unsubstituted %d

> Thank you Andrew! I used this second version of your patch
> against 5.16.1 and it seems to work:
> 
>     $ sudo ping -f 172.16.0.1
> 
>     613 root 20 0 0 0 0 S 11.0 0.0 0:07.46 napi/eth0-385
>     614 root 20 0 0 0 0 R  5.3 0.0 0:03.96 napi/eth0-386
> 
> Posting used diff as is just in case:
> 
> Tested-by: Sergei Trofimovich <slyich@...il.com>

Great, thanks for testing.

> 
> --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> @@ -2706,6 +2706,15 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		goto err_alloc_etherdev;
>  	}
> 
> +	if (rtnl_lock_killable()) {
> +		err = -EINTR;
> +		goto err_init_netdev;
> +	}
> +	err = dev_alloc_name(netdev, netdev->name);
> +	rtnl_unlock();
> +	if (err < 0)
> +		goto err_init_netdev;

Since there are multiple users of dev_alloc_name() and it appears some
get locking wrong, it makes sense to add a helper in the code which
does the locking. So i will work on a patchset to add such a helper
and convert other drivers.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ