Merge branch 'tipc-fixes'
Jon Maloy says: ==================== tipc: three bug fixes A set of unrelated corrections; one for the tipc netns implementation, one regarding problems with random link resets, and one removing a an erroneous refcount decrement when reading link statistsics via netlink. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
37a06a87f2
|
@ -2143,7 +2143,6 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
err = __tipc_nl_add_node_links(net, &msg, node,
|
||||
&prev_link);
|
||||
tipc_node_unlock(node);
|
||||
tipc_node_put(node);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ static void tipc_conn_kref_release(struct kref *kref)
|
|||
}
|
||||
saddr->scope = -TIPC_NODE_SCOPE;
|
||||
kernel_bind(sock, (struct sockaddr *)saddr, sizeof(*saddr));
|
||||
sk_release_kernel(sk);
|
||||
sock_release(sock);
|
||||
con->sock = NULL;
|
||||
}
|
||||
|
||||
|
@ -321,12 +321,9 @@ static struct socket *tipc_create_listen_sock(struct tipc_conn *con)
|
|||
struct socket *sock = NULL;
|
||||
int ret;
|
||||
|
||||
ret = sock_create_kern(AF_TIPC, SOCK_SEQPACKET, 0, &sock);
|
||||
ret = __sock_create(s->net, AF_TIPC, SOCK_SEQPACKET, 0, &sock, 1);
|
||||
if (ret < 0)
|
||||
return NULL;
|
||||
|
||||
sk_change_net(sock->sk, s->net);
|
||||
|
||||
ret = kernel_setsockopt(sock, SOL_TIPC, TIPC_IMPORTANCE,
|
||||
(char *)&s->imp, sizeof(s->imp));
|
||||
if (ret < 0)
|
||||
|
@ -376,7 +373,7 @@ static struct socket *tipc_create_listen_sock(struct tipc_conn *con)
|
|||
|
||||
create_err:
|
||||
kernel_sock_shutdown(sock, SHUT_RDWR);
|
||||
sk_release_kernel(sock->sk);
|
||||
sock_release(sock);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1764,13 +1764,14 @@ static int tipc_sk_enqueue(struct sk_buff_head *inputq, struct sock *sk,
|
|||
int tipc_sk_rcv(struct net *net, struct sk_buff_head *inputq)
|
||||
{
|
||||
u32 dnode, dport = 0;
|
||||
int err = -TIPC_ERR_NO_PORT;
|
||||
int err;
|
||||
struct sk_buff *skb;
|
||||
struct tipc_sock *tsk;
|
||||
struct tipc_net *tn;
|
||||
struct sock *sk;
|
||||
|
||||
while (skb_queue_len(inputq)) {
|
||||
err = -TIPC_ERR_NO_PORT;
|
||||
skb = NULL;
|
||||
dport = tipc_skb_peek_port(inputq, dport);
|
||||
tsk = tipc_sk_lookup(net, dport);
|
||||
|
|
Loading…
Reference in New Issue