diff options
-rw-r--r-- | net/tipc/link.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index a3616b99529b..9d18c9b7638b 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1802,6 +1802,15 @@ static int link_recv_buf_validate(struct sk_buff *buf) | |||
1802 | return pskb_may_pull(buf, hdr_size); | 1802 | return pskb_may_pull(buf, hdr_size); |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | /** | ||
1806 | * tipc_recv_msg - process TIPC messages arriving from off-node | ||
1807 | * @head: pointer to message buffer chain | ||
1808 | * @tb_ptr: pointer to bearer message arrived on | ||
1809 | * | ||
1810 | * Invoked with no locks held. Bearer pointer must point to a valid bearer | ||
1811 | * structure (i.e. cannot be NULL), but bearer can be inactive. | ||
1812 | */ | ||
1813 | |||
1805 | void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | 1814 | void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) |
1806 | { | 1815 | { |
1807 | read_lock_bh(&tipc_net_lock); | 1816 | read_lock_bh(&tipc_net_lock); |
@@ -1819,6 +1828,11 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
1819 | 1828 | ||
1820 | head = head->next; | 1829 | head = head->next; |
1821 | 1830 | ||
1831 | /* Ensure bearer is still enabled */ | ||
1832 | |||
1833 | if (unlikely(!b_ptr->active)) | ||
1834 | goto cont; | ||
1835 | |||
1822 | /* Ensure message is well-formed */ | 1836 | /* Ensure message is well-formed */ |
1823 | 1837 | ||
1824 | if (unlikely(!link_recv_buf_validate(buf))) | 1838 | if (unlikely(!link_recv_buf_validate(buf))) |