Skip to content

Commit

Permalink
tipc: Convert fatal broadcast sanity check to non-fatal check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Jun 24, 2011
1 parent 21e8425 commit 5e72690
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,16 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
if (likely(!msg_non_seq(buf_msg(buf)))) {
struct tipc_msg *msg;

assert(tipc_bcast_nmap.count != 0);
bcbuf_set_acks(buf, tipc_bcast_nmap.count);
msg = buf_msg(buf);
msg_set_non_seq(msg, 1);
msg_set_mc_netid(msg, tipc_net_id);
bcl->stats.sent_info++;

if (WARN_ON(!tipc_bcast_nmap.count)) {
dump_stack();
return 0;
}
}

/* Send buffer over bearers until all targets reached */
Expand Down

0 comments on commit 5e72690

Please sign in to comment.