Mon, Oct 12, 2015 at 02:41:06PM IDT, razor@xxxxxxxxxxxxx wrote: >From: Nikolay Aleksandrov <nikolay@xxxxxxxxxxxxxxxxxxx> > 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 >