WSL2-Linux-Kernel/net/sctp
Xin Long 8ff0b1f08e sctp: move sk_route_caps check and set into sctp_outq_flush_transports
The sk's sk_route_caps is set in sctp_packet_config, and later it
only needs to change when traversing the transport_list in a loop,
as the dst might be changed in the tx path.

So move sk_route_caps check and set into sctp_outq_flush_transports
from sctp_packet_transmit. This also fixes a dst leak reported by
Chen Yi:

  https://bugzilla.kernel.org/show_bug.cgi?id=212227

As calling sk_setup_caps() in sctp_packet_transmit may also set the
sk_route_caps for the ctrl sock in a netns. When the netns is being
deleted, the ctrl sock's releasing is later than dst dev's deleting,
which will cause this dev's deleting to hang and dmesg error occurs:

  unregister_netdevice: waiting for xxx to become free. Usage count = 1

Reported-by: Chen Yi <yiche@redhat.com>
Fixes: bcd623d8e9 ("sctp: call sk_setup_caps in sctp_packet_transmit instead")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-19 11:34:49 -07:00
..
Kconfig sctp: create udp4 sock and add its encap_rcv 2020-10-30 15:23:52 -07:00
Makefile
associola.c sctp: add encap_port for netns sock asoc and transport 2020-10-30 15:24:06 -07:00
auth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-08 15:44:50 -07:00
bind_addr.c net: sctp: bind_addr.c: delete duplicated word 2020-08-24 16:21:43 -07:00
chunk.c net: sctp: chunk.c: delete duplicated word 2020-08-24 16:21:43 -07:00
debug.c
diag.c
endpointola.c
input.c sctp: change to hold/put transport for proto_unreach_timer 2020-11-14 11:57:12 -08:00
inqueue.c
ipv6.c sctp: bring inet(6)_skb_parm back to sctp_input_cb 2020-11-05 14:27:30 -08:00
objcnt.c
offload.c sctp: remove the NETIF_F_SG flag before calling skb_segment 2021-01-16 19:05:59 -08:00
output.c sctp: move sk_route_caps check and set into sctp_outq_flush_transports 2021-03-19 11:34:49 -07:00
outqueue.c sctp: move sk_route_caps check and set into sctp_outq_flush_transports 2021-03-19 11:34:49 -07:00
primitive.c
proc.c net: fix iteration for sctp transport seq_files 2021-02-08 10:15:49 -08:00
protocol.c sctp: bring inet(6)_skb_parm back to sctp_input_cb 2020-11-05 14:27:30 -08:00
sm_make_chunk.c sctp: add the error cause for new encapsulation port restart 2020-10-30 15:24:40 -07:00
sm_sideeffect.c sctp: change to hold/put transport for proto_unreach_timer 2020-11-14 11:57:12 -08:00
sm_statefuns.c sctp: handle the init chunk matching an existing asoc 2020-10-30 15:24:44 -07:00
sm_statetable.c
socket.c sctp: add udphdr to overhead when udp_port is set 2020-10-30 15:24:21 -07:00
stream.c net: sctp: Fix negotiation of the number of data streams. 2020-08-20 16:37:37 -07:00
stream_interleave.c
stream_sched.c
stream_sched_prio.c
stream_sched_rr.c
sysctl.c sctp: enable udp tunneling socks 2020-10-30 15:24:49 -07:00
transport.c sctp: Fix some typo 2020-11-23 17:44:11 -08:00
tsnmap.c net: sctp: trivial: fix typo in comment 2021-03-04 13:48:32 -08:00
ulpevent.c
ulpqueue.c net: sctp: ulpqueue.c: delete duplicated word 2020-08-24 16:21:43 -07:00