diff options
author | David S. Miller <davem@davemloft.net> | 2013-04-07 18:37:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-07 18:37:01 -0400 |
commit | d978a6361ad13f1f9694fcb7b5852d253a544d92 (patch) | |
tree | 8e8a8c62286fab2c044c4b53563222c1b66d7cb0 /net/nfc | |
parent | 8303e699f7089a1cd1421750fb33f289e5f3e1b9 (diff) | |
parent | cb28ea3b13b86fb23448525f34720e659bda7aa8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/nfc/microread/mei.c
net/netfilter/nfnetlink_queue_core.c
Pull in 'net' to get Eric Biederman's AF_UNIX fix, upon which
some cleanups are going to go on-top.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp/llcp.c | 8 | ||||
-rw-r--r-- | net/nfc/llcp/sock.c | 9 |
2 files changed, 6 insertions, 11 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c index bb67b98b9797..7de0368aff0c 100644 --- a/net/nfc/llcp/llcp.c +++ b/net/nfc/llcp/llcp.c | |||
@@ -107,8 +107,6 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen, | |||
107 | accept_sk->sk_state_change(sk); | 107 | accept_sk->sk_state_change(sk); |
108 | 108 | ||
109 | bh_unlock_sock(accept_sk); | 109 | bh_unlock_sock(accept_sk); |
110 | |||
111 | sock_orphan(accept_sk); | ||
112 | } | 110 | } |
113 | 111 | ||
114 | if (listen == true) { | 112 | if (listen == true) { |
@@ -134,8 +132,6 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen, | |||
134 | 132 | ||
135 | bh_unlock_sock(sk); | 133 | bh_unlock_sock(sk); |
136 | 134 | ||
137 | sock_orphan(sk); | ||
138 | |||
139 | sk_del_node_init(sk); | 135 | sk_del_node_init(sk); |
140 | } | 136 | } |
141 | 137 | ||
@@ -164,8 +160,6 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen, | |||
164 | 160 | ||
165 | bh_unlock_sock(sk); | 161 | bh_unlock_sock(sk); |
166 | 162 | ||
167 | sock_orphan(sk); | ||
168 | |||
169 | sk_del_node_init(sk); | 163 | sk_del_node_init(sk); |
170 | } | 164 | } |
171 | 165 | ||
@@ -869,7 +863,6 @@ static void nfc_llcp_recv_ui(struct nfc_llcp_local *local, | |||
869 | skb_get(skb); | 863 | skb_get(skb); |
870 | } else { | 864 | } else { |
871 | pr_err("Receive queue is full\n"); | 865 | pr_err("Receive queue is full\n"); |
872 | kfree_skb(skb); | ||
873 | } | 866 | } |
874 | 867 | ||
875 | nfc_llcp_sock_put(llcp_sock); | 868 | nfc_llcp_sock_put(llcp_sock); |
@@ -1072,7 +1065,6 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local, | |||
1072 | skb_get(skb); | 1065 | skb_get(skb); |
1073 | } else { | 1066 | } else { |
1074 | pr_err("Receive queue is full\n"); | 1067 | pr_err("Receive queue is full\n"); |
1075 | kfree_skb(skb); | ||
1076 | } | 1068 | } |
1077 | } | 1069 | } |
1078 | 1070 | ||
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 6b3254452b36..c1101e6de170 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -388,7 +388,9 @@ struct sock *nfc_llcp_accept_dequeue(struct sock *parent, | |||
388 | } | 388 | } |
389 | 389 | ||
390 | if (sk->sk_state == LLCP_CONNECTED || !newsock) { | 390 | if (sk->sk_state == LLCP_CONNECTED || !newsock) { |
391 | nfc_llcp_accept_unlink(sk); | 391 | list_del_init(&lsk->accept_queue); |
392 | sock_put(sk); | ||
393 | |||
392 | if (newsock) | 394 | if (newsock) |
393 | sock_graft(sk, newsock); | 395 | sock_graft(sk, newsock); |
394 | 396 | ||
@@ -583,8 +585,6 @@ static int llcp_sock_release(struct socket *sock) | |||
583 | nfc_llcp_accept_unlink(accept_sk); | 585 | nfc_llcp_accept_unlink(accept_sk); |
584 | 586 | ||
585 | release_sock(accept_sk); | 587 | release_sock(accept_sk); |
586 | |||
587 | sock_orphan(accept_sk); | ||
588 | } | 588 | } |
589 | } | 589 | } |
590 | 590 | ||
@@ -765,6 +765,8 @@ static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
765 | 765 | ||
766 | pr_debug("%p %zu\n", sk, len); | 766 | pr_debug("%p %zu\n", sk, len); |
767 | 767 | ||
768 | msg->msg_namelen = 0; | ||
769 | |||
768 | lock_sock(sk); | 770 | lock_sock(sk); |
769 | 771 | ||
770 | if (sk->sk_state == LLCP_CLOSED && | 772 | if (sk->sk_state == LLCP_CLOSED && |
@@ -810,6 +812,7 @@ static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
810 | 812 | ||
811 | pr_debug("Datagram socket %d %d\n", ui_cb->dsap, ui_cb->ssap); | 813 | pr_debug("Datagram socket %d %d\n", ui_cb->dsap, ui_cb->ssap); |
812 | 814 | ||
815 | memset(sockaddr, 0, sizeof(*sockaddr)); | ||
813 | sockaddr->sa_family = AF_NFC; | 816 | sockaddr->sa_family = AF_NFC; |
814 | sockaddr->nfc_protocol = NFC_PROTO_NFC_DEP; | 817 | sockaddr->nfc_protocol = NFC_PROTO_NFC_DEP; |
815 | sockaddr->dsap = ui_cb->dsap; | 818 | sockaddr->dsap = ui_cb->dsap; |