diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-06-10 15:13:32 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-10 16:22:26 -0400 |
commit | c0a4c2d1cde70d876da3f5a76a7284abf8d1800a (patch) | |
tree | 7a1fb47f62cc7b972a682d59298f1960a7785359 /net/sctp | |
parent | 6dfe4b97e08ec3d1a593fdaca099f0ef0a3a19e6 (diff) |
sctp: use read_lock_bh in sctp_eps_seq_show
This patch is to use read_lock_bh instead of local_bh_disable
and read_lock in sctp_eps_seq_show.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/proc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 5a27d0f03df5..8e34db56bc1d 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c @@ -218,8 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v) return -ENOMEM; head = &sctp_ep_hashtable[hash]; - local_bh_disable(); - read_lock(&head->lock); + read_lock_bh(&head->lock); sctp_for_each_hentry(epb, &head->chain) { ep = sctp_ep(epb); sk = epb->sk; @@ -234,8 +233,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v) sctp_seq_dump_local_addrs(seq, epb); seq_printf(seq, "\n"); } - read_unlock(&head->lock); - local_bh_enable(); + read_unlock_bh(&head->lock); return 0; } |