aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r--net/ipv4/inet_diag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 1cb154ed75a..998a78f169f 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -778,7 +778,7 @@ skip_listen_ht:
778 778
779 for (i = s_i; i < hashinfo->ehash_size; i++) { 779 for (i = s_i; i < hashinfo->ehash_size; i++) {
780 struct inet_ehash_bucket *head = &hashinfo->ehash[i]; 780 struct inet_ehash_bucket *head = &hashinfo->ehash[i];
781 rwlock_t *lock = inet_ehash_lockp(hashinfo, i); 781 spinlock_t *lock = inet_ehash_lockp(hashinfo, i);
782 struct sock *sk; 782 struct sock *sk;
783 struct hlist_nulls_node *node; 783 struct hlist_nulls_node *node;
784 784
@@ -791,7 +791,7 @@ skip_listen_ht:
791 if (i > s_i) 791 if (i > s_i)
792 s_num = 0; 792 s_num = 0;
793 793
794 read_lock_bh(lock); 794 spin_lock_bh(lock);
795 sk_nulls_for_each(sk, node, &head->chain) { 795 sk_nulls_for_each(sk, node, &head->chain) {
796 struct inet_sock *inet = inet_sk(sk); 796 struct inet_sock *inet = inet_sk(sk);
797 797
@@ -806,7 +806,7 @@ skip_listen_ht:
806 r->id.idiag_dport) 806 r->id.idiag_dport)
807 goto next_normal; 807 goto next_normal;
808 if (inet_csk_diag_dump(sk, skb, cb) < 0) { 808 if (inet_csk_diag_dump(sk, skb, cb) < 0) {
809 read_unlock_bh(lock); 809 spin_unlock_bh(lock);
810 goto done; 810 goto done;
811 } 811 }
812next_normal: 812next_normal:
@@ -828,14 +828,14 @@ next_normal:
828 r->id.idiag_dport) 828 r->id.idiag_dport)
829 goto next_dying; 829 goto next_dying;
830 if (inet_twsk_diag_dump(tw, skb, cb) < 0) { 830 if (inet_twsk_diag_dump(tw, skb, cb) < 0) {
831 read_unlock_bh(lock); 831 spin_unlock_bh(lock);
832 goto done; 832 goto done;
833 } 833 }
834next_dying: 834next_dying:
835 ++num; 835 ++num;
836 } 836 }
837 } 837 }
838 read_unlock_bh(lock); 838 spin_unlock_bh(lock);
839 } 839 }
840 840
841done: 841done: