linux/net/sctp
Xin Long cfe4bd7a25 sctp: check and update stream->out_curr when allocating stream_out
Now when using stream reconfig to add out streams, stream->out
will get re-allocated, and all old streams' information will
be copied to the new ones and the old ones will be freed.

So without stream->out_curr updated, next time when trying to
send from stream->out_curr stream, a panic would be caused.

This patch is to check and update stream->out_curr when
allocating stream_out.

v1->v2:
  - define fa_index() to get elem index from stream->out_curr.
v2->v3:
  - repost with no change.

Fixes: 5bbbbe32a4 ("sctp: introduce stream scheduler foundations")
Reported-by: Ying Xu <yinxu@redhat.com>
Reported-by: syzbot+e33a3a138267ca119c7d@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-03 14:27:47 -08:00
..
Kconfig
Makefile
associola.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
auth.c
bind_addr.c sctp: add sock_reuseport for the sock in __sctp_hash_endpoint 2018-11-12 09:09:51 -08:00
chunk.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
debug.c
diag.c
endpointola.c
input.c sctp: add sock_reuseport for the sock in __sctp_hash_endpoint 2018-11-12 09:09:51 -08:00
inqueue.c
ipv6.c sctp: set flow sport from saddr only when it's 0 2019-01-24 18:13:57 -08:00
objcnt.c
offload.c
output.c sctp: increase sk_wmem_alloc when head->truesize is increased 2018-11-27 15:42:31 -08:00
outqueue.c sctp: define SCTP_SS_DEFAULT for Stream schedulers 2018-11-03 19:40:29 -07:00
primitive.c sctp: rename enum sctp_event to sctp_event_type 2018-11-19 12:25:43 -08:00
proc.c sctp: remove useless start_fail from sctp_ht_iter in proc 2018-08-27 15:13:17 -07:00
protocol.c sctp: set flow sport from saddr only when it's 0 2019-01-24 18:13:57 -08:00
sm_make_chunk.c sctp: set chunk transport correctly when it's a new asoc 2019-01-24 18:13:57 -08:00
sm_sideeffect.c sctp: rename enum sctp_event to sctp_event_type 2018-11-19 12:25:43 -08:00
sm_statefuns.c
sm_statetable.c sctp: rename enum sctp_event to sctp_event_type 2018-11-19 12:25:43 -08:00
socket.c sctp: walk the list of asoc safely 2019-02-01 10:41:46 -08:00
stream.c sctp: check and update stream->out_curr when allocating stream_out 2019-02-03 14:27:47 -08:00
stream_interleave.c sctp: add subscribe per asoc 2018-11-19 12:25:43 -08:00
stream_sched.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
stream_sched_prio.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
stream_sched_rr.c net/sctp: Make wrappers for accessing in/out streams 2018-08-11 12:25:15 -07:00
sysctl.c
transport.c sctp: update dst pmtu with the correct daddr 2018-09-20 11:29:30 -07:00
tsnmap.c
ulpevent.c
ulpqueue.c sctp: add subscribe per asoc 2018-11-19 12:25:43 -08:00