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: <20151012172921.GB6756@colbert.mtl.com>
Date:	Mon, 12 Oct 2015 20:29:55 +0300
From:	Ido Schimmel <idosch@...lanox.com>
To:	Nikolay Aleksandrov <razor@...ckwall.org>
CC:	<netdev@...r.kernel.org>, <shm@...ulusnetworks.com>,
	<roopa@...ulusnetworks.com>, <stephen@...workplumber.org>,
	<bridge@...ts.linux-foundation.org>, <davem@...emloft.net>,
	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: Re: [PATCH net-next 1/4] bridge: vlan: use proper rcu for the vlgrp
 member

Mon, Oct 12, 2015 at 02:41:06PM IDT, razor@...ckwall.org wrote:
>From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
>
Hi Nik,

Small nitpick:

<snip>

>@@ -825,17 +848,19 @@ unlock:
> 
> int br_vlan_init(struct net_bridge *br)
> {
>+	struct net_bridge_vlan_group *vg;
> 	int ret = -ENOMEM;
> 
>-	br->vlgrp = kzalloc(sizeof(struct net_bridge_vlan_group), GFP_KERNEL);
>-	if (!br->vlgrp)
>+	vg = kzalloc(sizeof(struct net_bridge_vlan_group), GFP_KERNEL);
Maybe just do sizeof(*vg)?
>+	if (!vg)
> 		goto out;
>-	ret = rhashtable_init(&br->vlgrp->vlan_hash, &br_vlan_rht_params);
>+	ret = rhashtable_init(&vg->vlan_hash, &br_vlan_rht_params);
> 	if (ret)
> 		goto err_rhtbl;
>-	INIT_LIST_HEAD(&br->vlgrp->vlan_list);
>+	INIT_LIST_HEAD(&vg->vlan_list);
> 	br->vlan_proto = htons(ETH_P_8021Q);
> 	br->default_pvid = 1;
>+	rcu_assign_pointer(br->vlgrp, vg);
> 	ret = br_vlan_add(br, 1,
> 			  BRIDGE_VLAN_INFO_PVID | BRIDGE_VLAN_INFO_UNTAGGED |
> 			  BRIDGE_VLAN_INFO_BRENTRY);
>@@ -846,9 +871,9 @@ out:
> 	return ret;

</snip>

>-- 
>2.4.3
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ