+       tsk->probing_state = TIPC_CONN_PROBING;
+       sk_reset_timer(sk, &sk->sk_timer, jiffies + CONN_PROBING_INTERVAL);
        bh_unlock_sock(sk);
-       if (skb)
-               tipc_node_xmit_skb(sock_net(sk), skb, peer_node, tsk->portid);
+
+       tipc_node_xmit_skb(sock_net(sk), skb, peer_node, tsk->portid);

No, here we must check wehther skb is NULL or not before tipc_node_xmit_skb(), 
otherwise, it might lead to a crash.
For example, when the allocation of a skb in tipc_buf_acquire() is failed, 
tipc_msg_create() will return NULL.

Regards,
Ying

 exit:
        sock_put(sk);
 }
--
2.1.4

------------------------------------------------------------------------------
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to