batman-adv: Fix potential broadcast BLA-duplicate-check race condition
Threads in the bottom half of batadv_bla_check_bcast_duplist() might otherwise for instance overwrite variables which other threads might be using/reading at the same time in the top half, potentially leading to messing up the bcast_duplist, possibly resulting in false bridge loop avoidance duplicate check decisions. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
This commit is contained in:
committed by
Antonio Quartulli
parent
7f112af40f
commit
7dac7b76b8
@ -205,6 +205,8 @@ struct batadv_priv_bla {
|
||||
struct batadv_hashtable *backbone_hash;
|
||||
struct batadv_bcast_duplist_entry bcast_duplist[BATADV_DUPLIST_SIZE];
|
||||
int bcast_duplist_curr;
|
||||
/* protects bcast_duplist and bcast_duplist_curr */
|
||||
spinlock_t bcast_duplist_lock;
|
||||
struct batadv_bla_claim_dst claim_dest;
|
||||
struct delayed_work work;
|
||||
};
|
||||
|
Reference in New Issue
Block a user