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] [day] [month] [year] [list]
Date:   Tue, 20 Mar 2018 18:56:42 +0100
From:   Antoine Tenart <antoine.tenart@...tlin.com>
To:     Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Antoine Tenart <antoine.tenart@...tlin.com>,
        thomas.petazzoni@...tlin.com, gregory.clement@...tlin.com,
        miquel.raynal@...tlin.com, nadavh@...vell.com, stefanc@...vell.com,
        ymarkman@...vell.com, mw@...ihalf.com
Subject: Re: [PATCH net-next] net: mvpp2: Don't use dynamic allocs for local
 variables

Hi Maxime,

On Tue, Mar 20, 2018 at 04:34:08PM +0100, Maxime Chevallier wrote:
> @@ -2416,36 +2393,36 @@ static int mvpp2_prs_double_vlan_add(struct mvpp2 *priv, unsigned short tpid1,
>  		}
>  
>  		if (tid >= tid_aux) {
> -			ret = -ERANGE;
> -			goto free_pe;
> +			return -ERANGE;
>  		}

You can remove the brackets here.

> @@ -3833,39 +3804,39 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2_port *port, const u8 *da,

[...]

>  	/* Invalidate the entry if no ports are left enabled */
> -	pmap = mvpp2_prs_tcam_port_map_get(pe);
> +	pmap = mvpp2_prs_tcam_port_map_get(&pe);
>  	if (pmap == 0) {
>  		if (add) {
> -			kfree(pe);
>  			return -EINVAL;
>  		}

And here.

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ