aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index cedd9bf67b8c..c99458df3f3f 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5882,8 +5882,7 @@ static struct sctp_bind_bucket *sctp_bucket_create(
5882static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr) 5882static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
5883{ 5883{
5884 struct sctp_bind_hashbucket *head; /* hash list */ 5884 struct sctp_bind_hashbucket *head; /* hash list */
5885 struct sctp_bind_bucket *pp; /* hash list port iterator */ 5885 struct sctp_bind_bucket *pp;
5886 struct hlist_node *node;
5887 unsigned short snum; 5886 unsigned short snum;
5888 int ret; 5887 int ret;
5889 5888
@@ -5910,7 +5909,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
5910 index = sctp_phashfn(sock_net(sk), rover); 5909 index = sctp_phashfn(sock_net(sk), rover);
5911 head = &sctp_port_hashtable[index]; 5910 head = &sctp_port_hashtable[index];
5912 sctp_spin_lock(&head->lock); 5911 sctp_spin_lock(&head->lock);
5913 sctp_for_each_hentry(pp, node, &head->chain) 5912 sctp_for_each_hentry(pp, &head->chain)
5914 if ((pp->port == rover) && 5913 if ((pp->port == rover) &&
5915 net_eq(sock_net(sk), pp->net)) 5914 net_eq(sock_net(sk), pp->net))
5916 goto next; 5915 goto next;
@@ -5938,7 +5937,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
5938 */ 5937 */
5939 head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)]; 5938 head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)];
5940 sctp_spin_lock(&head->lock); 5939 sctp_spin_lock(&head->lock);
5941 sctp_for_each_hentry(pp, node, &head->chain) { 5940 sctp_for_each_hentry(pp, &head->chain) {
5942 if ((pp->port == snum) && net_eq(pp->net, sock_net(sk))) 5941 if ((pp->port == snum) && net_eq(pp->net, sock_net(sk)))
5943 goto pp_found; 5942 goto pp_found;
5944 } 5943 }
@@ -5970,7 +5969,7 @@ pp_found:
5970 * that this port/socket (sk) combination are already 5969 * that this port/socket (sk) combination are already
5971 * in an endpoint. 5970 * in an endpoint.
5972 */ 5971 */
5973 sk_for_each_bound(sk2, node, &pp->owner) { 5972 sk_for_each_bound(sk2, &pp->owner) {
5974 struct sctp_endpoint *ep2; 5973 struct sctp_endpoint *ep2;
5975 ep2 = sctp_sk(sk2)->ep; 5974 ep2 = sctp_sk(sk2)->ep;
5976 5975