diff options
author | Linus Lüssing <linus.luessing@web.de> | 2012-10-17 14:53:05 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-10-18 18:17:31 +0200 |
commit | 7dac7b76b8db87fc79857a53a09730fb2148579b (patch) | |
tree | 4d03c5a61a0785e0e5cc696005459b20f7094bfe /net/batman-adv/types.h | |
parent | 7f112af40fecf5399b61e69ffc6b55a9d82789f7 (diff) | |
download | lwn-7dac7b76b8db87fc79857a53a09730fb2148579b.tar.gz lwn-7dac7b76b8db87fc79857a53a09730fb2148579b.zip |
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>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r-- | net/batman-adv/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 2ed82caacdca..ac1e07a80454 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -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; }; |