From d12cc6668c5b89f9b0823ab4f512dfa9b8ccd5bd Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 17 Aug 2010 11:00:07 +0000 Subject: [PATCH] --- yaml --- r: 213822 b: refs/heads/master c: b02b69c8a403859ec72090742727e853d606a325 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/tipc/link.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6fa278efece0..29b06e6ec796 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f662c07058f7e6365ae65080d772f9122f6f50a9 +refs/heads/master: b02b69c8a403859ec72090742727e853d606a325 diff --git a/trunk/net/tipc/link.c b/trunk/net/tipc/link.c index a3616b99529b..9d18c9b7638b 100644 --- a/trunk/net/tipc/link.c +++ b/trunk/net/tipc/link.c @@ -1802,6 +1802,15 @@ static int link_recv_buf_validate(struct sk_buff *buf) return pskb_may_pull(buf, hdr_size); } +/** + * tipc_recv_msg - process TIPC messages arriving from off-node + * @head: pointer to message buffer chain + * @tb_ptr: pointer to bearer message arrived on + * + * Invoked with no locks held. Bearer pointer must point to a valid bearer + * structure (i.e. cannot be NULL), but bearer can be inactive. + */ + void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) { read_lock_bh(&tipc_net_lock); @@ -1819,6 +1828,11 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) head = head->next; + /* Ensure bearer is still enabled */ + + if (unlikely(!b_ptr->active)) + goto cont; + /* Ensure message is well-formed */ if (unlikely(!link_recv_buf_validate(buf)))