summaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-26 17:41:45 +0200
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-02-06 22:59:17 +0100
commit57732560d1aa7d454d10e557f8959d19d1454174 (patch)
treece7f71d73e387c3ef9fbf4e4896d7343323f5d45 /net/tipc/bcast.c
parenttipc: Fix problem with broadcast link synchronization between nodes (diff)
downloadlinux-57732560d1aa7d454d10e557f8959d19d1454174.tar.xz
linux-57732560d1aa7d454d10e557f8959d19d1454174.zip
tipc: Add missing broadcast link lock when sending NACK
Ensures that any attempt to send a NACK message over TIPC's broadcast link has exclusive access to the link's main data structures, to prevent interference with a simultaneous attempt to send other broadcast link traffic (such as application-generated multicast messages). Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 8eb87b11d100..7342abc2cfa1 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -340,8 +340,10 @@ static void bclink_send_nack(struct tipc_node *n_ptr)
msg_set_bcgap_to(msg, n_ptr->bclink.gap_to);
msg_set_bcast_tag(msg, tipc_own_tag);
+ spin_lock_bh(&bc_lock);
tipc_bearer_send(&bcbearer->bearer, buf, NULL);
bcl->stats.sent_nacks++;
+ spin_unlock_bh(&bc_lock);
buf_discard(buf);
/*