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: <19b64e9a-90ce-0645-f3ab-c096b5859258@cogentembedded.com>
Date:   Thu, 18 Apr 2019 12:35:44 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc:     netdev <netdev@...r.kernel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH net-next 08/15] dsa: Keep link list of tag drivers

On 18.04.2019 5:31, Andrew Lunn wrote:

> Let the tag drivers register themselves with the DSA core, keeping
> them in a linked list.
> 
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
>   include/net/dsa.h |  2 ++
>   net/dsa/dsa.c     | 35 ++++++++++++++++++++++++++++++++++-
>   2 files changed, 36 insertions(+), 1 deletion(-)
> 
[...]
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index a49e230b6247..861fe1441a7d 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -27,6 +27,9 @@
[...]
>   int dsa_tag_drivers_register(struct dsa_device_ops *ops[],
>   			     unsigned int count, struct module *owner)
>   {
> -	return 0;
> +	int err, i;
> +
> +	for (i = 0; i < count; i++) {
> +		err = dsa_tag_driver_register(ops[i], owner);
> +		if (err)
> +			break;
> +	}
> +
> +	return err;

    What if count == 0? Can't happen?

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ