Project

General

Profile

Bug #215 ยป 0001-batman-adv-fix-kernel-crash-due-to-missing-NULL-chec.patch

Marek Lindner, 06/09/2015 03:29 PM

View differences:

soft-interface.c
*/
void batadv_softif_vlan_free_ref(struct batadv_softif_vlan *vlan)
{
if (!vlan)
return;
if (atomic_dec_and_test(&vlan->refcount)) {
spin_lock_bh(&vlan->bat_priv->softif_vlan_list_lock);
hlist_del_rcu(&vlan->list);
translation-table.c
/* increase the refcounter of the related vlan */
vlan = batadv_softif_vlan_get(bat_priv, vid);
if (!vlan)
goto out;
batadv_dbg(BATADV_DBG_TT, bat_priv,
"Creating new local tt entry: %pM (vid: %d, ttvn: %d)\n",
......
/* decrease the reference held for this vlan */
vlan = batadv_softif_vlan_get(bat_priv, vid);
if (!vlan)
goto out;
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
......
/* decrease the reference held for this vlan */
vlan = batadv_softif_vlan_get(bat_priv,
tt_common_entry->vid);
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
if (vlan) {
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
}
batadv_tt_local_entry_free_ref(tt_local);
}
......
/* decrease the reference held for this vlan */
vlan = batadv_softif_vlan_get(bat_priv, tt_common->vid);
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
if (vlan) {
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
}
batadv_tt_local_entry_free_ref(tt_local);
}
    (1-1/1)