Skip to content

Commit c0a4c2d

Browse files
lxindavem330
authored andcommitted
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>
1 parent 6dfe4b9 commit c0a4c2d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/sctp/proc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
218218
return -ENOMEM;
219219

220220
head = &sctp_ep_hashtable[hash];
221-
local_bh_disable();
222-
read_lock(&head->lock);
221+
read_lock_bh(&head->lock);
223222
sctp_for_each_hentry(epb, &head->chain) {
224223
ep = sctp_ep(epb);
225224
sk = epb->sk;
@@ -234,8 +233,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
234233
sctp_seq_dump_local_addrs(seq, epb);
235234
seq_printf(seq, "\n");
236235
}
237-
read_unlock(&head->lock);
238-
local_bh_enable();
236+
read_unlock_bh(&head->lock);
239237

240238
return 0;
241239
}

0 commit comments

Comments
 (0)