aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-05-23 13:14:18 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-06-24 16:18:15 -0400
commit5e726900380cfff50436ca6c5e08b35b3357d82a (patch)
treecac273bd08cc73d1923c6458b98f04fd2939bff9 /net/tipc/bcast.c
parent21e842579a5fd1ce746be4e34ac53ef67d6f0a6b (diff)
tipc: Convert fatal broadcast sanity check to non-fatal check
Modifies the existing broadcast link sanity check that detects an attempt to send a message off-node when there are no available destinations so that it no longer causes a kernel panic; instead, the check now issues a warning and stack trace and then returns without sending the message anywhere. 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index fa68d1e9ff4..759b318b5ff 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -552,12 +552,16 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
552 if (likely(!msg_non_seq(buf_msg(buf)))) { 552 if (likely(!msg_non_seq(buf_msg(buf)))) {
553 struct tipc_msg *msg; 553 struct tipc_msg *msg;
554 554
555 assert(tipc_bcast_nmap.count != 0);
556 bcbuf_set_acks(buf, tipc_bcast_nmap.count); 555 bcbuf_set_acks(buf, tipc_bcast_nmap.count);
557 msg = buf_msg(buf); 556 msg = buf_msg(buf);
558 msg_set_non_seq(msg, 1); 557 msg_set_non_seq(msg, 1);
559 msg_set_mc_netid(msg, tipc_net_id); 558 msg_set_mc_netid(msg, tipc_net_id);
560 bcl->stats.sent_info++; 559 bcl->stats.sent_info++;
560
561 if (WARN_ON(!tipc_bcast_nmap.count)) {
562 dump_stack();
563 return 0;
564 }
561 } 565 }
562 566
563 /* Send buffer over bearers until all targets reached */ 567 /* Send buffer over bearers until all targets reached */