diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2011-01-25 21:52:11 +0000 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-03-05 12:50:09 +0100 |
commit | f3e0008f01b275bd08bd416cfcaa7021dd6bc277 (patch) | |
tree | 47c1787dce5d3bda821a4ccb015d54b6b9cadc82 /net/batman-adv/types.h | |
parent | 0ede9f41b217d8982ab426e3c8c1b692a280a16f (diff) | |
download | blackbird-op-linux-f3e0008f01b275bd08bd416cfcaa7021dd6bc277.tar.gz blackbird-op-linux-f3e0008f01b275bd08bd416cfcaa7021dd6bc277.zip |
batman-adv: make broadcast seqno operations atomic
Batman-adv could receive several payload broadcasts at the same time
that would trigger access to the broadcast seqno sliding window to
determine whether this is a new broadcast or not. If these incoming
broadcasts are accessing the sliding window simultaneously it could
be left in an inconsistent state. Therefore it is necessary to make
sure this access is atomic.
Reported-by: Linus Lüssing <linus.luessing@web.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 9a142760bd9c..e1f3e5e71555 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -90,6 +90,8 @@ struct orig_node { spinlock_t ogm_cnt_lock; /* protects: bcast_own, bcast_own_sum, * neigh_node->real_bits, * neigh_node->real_packet_count */ + spinlock_t bcast_seqno_lock; /* protects bcast_bits, + * last_bcast_seqno */ atomic_t bond_candidates; struct list_head bond_list; }; |