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: <fef6f65d-473c-ee8e-51cc-1382cb6f84b9@gmail.com>
Date:   Thu, 12 Oct 2017 08:19:10 -0600
From:   David Ahern <dsahern@...il.com>
To:     Roman Mashak <mrv@...atatu.com>, davem@...emloft.net
Cc:     stephen@...workplumber.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/1] bridge: return error code when deleting
 Vlan

On 10/12/17 7:51 AM, Roman Mashak wrote:
> v2:
>  Return err immediately if nbp_vlan_delete() fails (pointed by David Ahern)
> 
> Signed-off-by: Roman Mashak <mrv@...atatu.com>
> ---
>  net/bridge/br_netlink.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
> index f0e8268..1efdd48 100644
> --- a/net/bridge/br_netlink.c
> +++ b/net/bridge/br_netlink.c
> @@ -527,11 +527,13 @@ static int br_vlan_info(struct net_bridge *br, struct net_bridge_port *p,
>  
>  	case RTM_DELLINK:
>  		if (p) {
> -			nbp_vlan_delete(p, vinfo->vid);
> +			err = nbp_vlan_delete(p, vinfo->vid);
> +			if (err)
> +				break;

I'm not sure a break is the right thing to do. Seems like you leave it
in a half configured state.

>  			if (vinfo->flags & BRIDGE_VLAN_INFO_MASTER)
> -				br_vlan_delete(p->br, vinfo->vid);
> +				err = br_vlan_delete(p->br, vinfo->vid);
>  		} else {
> -			br_vlan_delete(br, vinfo->vid);
> +			err = br_vlan_delete(br, vinfo->vid);
>  		}
>  		break;
>  	}
> 

Why do you want to return the error code here? Walking the code paths
seems like ENOENT or err from switchdev_port_obj_del are the 2 error
possibilities.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ