linux/net/sctp
Xin Long 581409dacc sctp: disable BH in sctp_for_each_endpoint
Now sctp holds read_lock when foreach sctp_ep_hashtable without disabling
BH. If CPU schedules to another thread A at this moment, the thread A may
be trying to hold the write_lock with disabling BH.

As BH is disabled and CPU cannot schedule back to the thread holding the
read_lock, while the thread A keeps waiting for the read_lock. A dead
lock would be triggered by this.

This patch is to fix this dead lock by calling read_lock_bh instead to
disable BH when holding the read_lock in sctp_for_each_endpoint.

Fixes: 626d16f50f ("sctp: export some apis or variables for sctp_diag and reuse some for proc")
Reported-by: Xiumei Mu <xmu@redhat.com>
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>
2017-06-10 16:18:10 -04:00
..
associola.c sctp: fix stream update when processing dupcookie 2017-05-24 15:21:04 -04:00
auth.c
bind_addr.c
chunk.c sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp 2017-04-03 14:52:35 -07:00
debug.c
endpointola.c
input.c sctp: fix ICMP processing if skb is non-linear 2017-05-26 14:40:46 -04:00
inqueue.c
ipv6.c sctp: do not inherit ipv6_{mc|ac|fl}_list from parent 2017-05-18 10:24:08 -04:00
Kconfig
Makefile
objcnt.c
offload.c
output.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
outqueue.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
primitive.c
probe.c
proc.c sctp: use right in and out stream cnt 2017-04-01 20:12:30 -07:00
protocol.c
sctp_diag.c
sm_make_chunk.c sctp: set new_asoc temp when processing dupcookie 2017-05-24 15:21:04 -04:00
sm_sideeffect.c
sm_statefuns.c sctp: set new_asoc temp when processing dupcookie 2017-05-24 15:21:04 -04:00
sm_statetable.c
socket.c sctp: disable BH in sctp_for_each_endpoint 2017-06-10 16:18:10 -04:00
stream.c sctp: process duplicated strreset asoc request correctly 2017-04-18 13:39:50 -04:00
sysctl.c
transport.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
tsnmap.c
ulpevent.c
ulpqueue.c