diff options
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/crypto.c | 1 | ||||
| -rw-r--r-- | net/tipc/link.c | 2 | ||||
| -rw-r--r-- | net/tipc/node.c | 4 | ||||
| -rw-r--r-- | net/tipc/topsrv.c | 5 | 
4 files changed, 8 insertions, 4 deletions
| diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index c8c47fc72653..8c47ded2edb6 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -1712,6 +1712,7 @@ exit:  	case -EBUSY:  		this_cpu_inc(stats->stat[STAT_ASYNC]);  		*skb = NULL; +		tipc_aead_put(aead);  		return rc;  	default:  		this_cpu_inc(stats->stat[STAT_NOK]); diff --git a/net/tipc/link.c b/net/tipc/link.c index 467c53a1fb5c..d4675e922a8f 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1065,7 +1065,7 @@ static void tipc_link_update_cwin(struct tipc_link *l, int released,  	/* Enter fast recovery */  	if (unlikely(retransmitted)) {  		l->ssthresh = max_t(u16, l->window / 2, 300); -		l->window = l->ssthresh; +		l->window = min_t(u16, l->ssthresh, l->window);  		return;  	}  	/* Enter slow start */ diff --git a/net/tipc/node.c b/net/tipc/node.c index 10292c942384..803a3a6d0f50 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -2038,6 +2038,7 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b)  		n = tipc_node_find_by_id(net, ehdr->id);  	}  	tipc_crypto_rcv(net, (n) ? n->crypto_rx : NULL, &skb, b); +	tipc_node_put(n);  	if (!skb)  		return; @@ -2090,7 +2091,7 @@ rcv:  	/* Check/update node state before receiving */  	if (unlikely(skb)) {  		if (unlikely(skb_linearize(skb))) -			goto discard; +			goto out_node_put;  		tipc_node_write_lock(n);  		if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) {  			if (le->link) { @@ -2119,6 +2120,7 @@ rcv:  	if (!skb_queue_empty(&xmitq))  		tipc_bearer_xmit(net, bearer_id, &xmitq, &le->maddr, n); +out_node_put:  	tipc_node_put(n);  discard:  	kfree_skb(skb); diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 3a12fc18239b..73dbed0c4b6b 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -402,10 +402,11 @@ static int tipc_conn_rcv_from_sock(struct tipc_conn *con)  		read_lock_bh(&sk->sk_callback_lock);  		ret = tipc_conn_rcv_sub(srv, con, &s);  		read_unlock_bh(&sk->sk_callback_lock); +		if (!ret) +			return 0;  	} -	if (ret < 0) -		tipc_conn_close(con); +	tipc_conn_close(con);  	return ret;  } |