source: packages/net/batman-adv/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch @ 28575

Last change on this file since 28575 was 28575, checked in by marek, 5 years ago

batman-adv: bugfixes for the 2011.3.1 release

Signed-off-by: Marek Lindner <lindner_marek@…>

File size: 662 bytes
  • translation-table.c

    After removing the batman-adv module, the hash may be already gone
    when tt_global_del_orig() tries to clean the hash. This patch adds
    a sanity check to avoid this.
    
    Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
    ---
     translation-table.c |    3 +++
     1 files changed, 3 insertions(+), 0 deletions(-)
    
    a b void tt_global_del_orig(struct bat_priv *bat_priv, 
    712712        struct hlist_head *head; 
    713713        spinlock_t *list_lock; /* protects write access to the hash lists */ 
    714714 
     715        if (!hash) 
     716                return; 
     717 
    715718        for (i = 0; i < hash->size; i++) { 
    716719                head = &hash->table[i]; 
    717720                list_lock = &hash->list_locks[i]; 
Note: See TracBrowser for help on using the repository browser.