kernel_optimize_test/include/net
Paolo Abeni 6761893eea inet_connection_sock: clear inet_num out of destroy helper
Clearing the 'inet_num' field is necessary and safe if and
only if the socket is not bound. The MPTCP protocol calls
the destroy helper on bound sockets, as tcp_v{4,6}_syn_recv_sock
completed successfully.

Move the clearing of such field out of the common code, otherwise
the MPTCP MP_JOIN error path will find the wrong 'inet_num' value
on socket disposal, __inet_put_port() will acquire the wrong lock
and bind_node removal could race with other modifiers possibly
corrupting the bind hash table.

Reported-and-tested-by: Christoph Paasch <cpaasch@apple.com>
Fixes: 729cd6436f ("mptcp: cope better with MP_JOIN failure")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-04 15:59:56 -07:00
..
9p
bluetooth
caif
iucv
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2020-06-01 11:46:30 -07:00
netns bpf: Add link-based BPF program attachment to network namespace 2020-06-01 15:21:03 -07:00
nfc
phonet
sctp sctp: add sctp_sock_set_nodelay 2020-05-29 13:10:39 -07:00
tc_act
6lowpan.h
act_api.h
addrconf.h
af_ieee802154.h
af_rxrpc.h
af_unix.h
af_vsock.h
ah.h
arp.h
atmclip.h
ax25.h
ax88796.h
bareudp.h
bond_3ad.h
bond_alb.h
bond_options.h
bonding.h
bpf_sk_storage.h
busy_poll.h
calipso.h
cfg80211-wext.h
cfg80211.h cfg80211: support bigger kek/kck key length 2020-05-31 11:27:24 +02:00
cfg802154.h
checksum.h default csum_and_copy_to_user(): don't bother with access_ok() 2020-05-29 16:11:50 -04:00
cipso_ipv4.h
cls_cgroup.h
codel_impl.h
codel_qdisc.h
codel.h
compat.h
datalink.h
dcbevent.h
dcbnl.h
devlink.h devlink: Add ACL control packet traps 2020-06-01 11:49:23 -07:00
dn_dev.h
dn_fib.h
dn_neigh.h
dn_nsp.h
dn_route.h
dn.h
drop_monitor.h
dsa.h
dsfield.h
dst_cache.h
dst_metadata.h
dst_ops.h
dst.h
erspan.h
esp.h
espintcp.h
ethoc.h
failover.h
fib_notifier.h
fib_rules.h
firewire.h
flow_dissector.h flow_dissector: Move out netns_bpf prog callbacks 2020-06-01 15:21:02 -07:00
flow_offload.h net: remove indirect block netdev event registration 2020-06-01 11:41:50 -07:00
flow.h
fou.h
fq_impl.h
fq.h
garp.h
gen_stats.h
genetlink.h
geneve.h
gre.h
gro_cells.h
gtp.h
gue.h
hwbm.h
icmp.h
ieee80211_radiotap.h
ieee802154_netdev.h
if_inet6.h
ife.h
ila.h
inet_common.h
inet_connection_sock.h inet_connection_sock: clear inet_num out of destroy helper 2020-06-04 15:59:56 -07:00
inet_ecn.h
inet_frag.h
inet_hashtables.h
inet_sock.h
inet_timewait_sock.h
inet6_connection_sock.h
inet6_hashtables.h
inetpeer.h
ip_fib.h
ip_tunnels.h
ip_vs.h
ip.h
ip6_checksum.h
ip6_fib.h
ip6_route.h
ip6_tunnel.h
ipcomp.h
ipconfig.h
ipv6_frag.h
ipv6_stubs.h
ipv6.h
ipx.h
iw_handler.h
kcm.h
l3mdev.h
lag.h
lapb.h
lib80211.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
llc.h
lwtunnel.h
mac80211.h mac80211: use HE 6 GHz band capability and pass it to the driver 2020-05-31 11:27:03 +02:00
mac802154.h
macsec.h
mip6.h
mld.h
mpls_iptunnel.h
mpls.h net: Make mpls_entry_encode() available for generic users 2020-05-29 21:20:20 -07:00
mptcp.h
mrp.h
ncsi.h
ndisc.h
neighbour.h
net_failover.h
net_namespace.h net: Introduce netns_bpf for BPF programs attached to netns 2020-06-01 15:21:02 -07:00
net_ratelimit.h
netevent.h
netlabel.h
netlink.h
netprio_cgroup.h
netrom.h
nexthop.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
nl802154.h
nsh.h
p8022.h
page_pool.h
pie.h
ping.h
pkt_cls.h
pkt_sched.h
pptp.h
protocol.h
psample.h
psnap.h
raw.h
rawv6.h
red.h
regulatory.h
request_sock.h
rose.h
route.h
rpl.h
rsi_91x.h
rtnetlink.h
rtnh.h
sch_generic.h
scm.h
secure_seq.h
seg6_hmac.h
seg6_local.h
seg6.h seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2020-06-04 15:39:32 -07:00
slhc_vj.h
smc.h
snmp.h
sock_reuseport.h
sock.h net: Make locking in sock_bindtoindex optional 2020-06-01 14:57:14 -07:00
Space.h
stp.h
strparser.h
switchdev.h bridge: mrp: Add support for role MRA 2020-06-01 11:56:11 -07:00
tcp_states.h
tcp.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
timewait_sock.h
tipc.h
tls_toe.h
tls.h bpf: Fix running sk_skb program types with ktls 2020-06-01 14:48:32 -07:00
transp_v6.h
tso.h
tun_proto.h
udp_tunnel.h
udp.h
udplite.h
vsock_addr.h
vxlan.h
wext.h
wimax.h
x25.h
x25device.h
xdp_priv.h
xdp_sock_drv.h
xdp_sock.h
xdp.h xdp: Rename convert_to_xdp_frame in xdp_convert_buff_to_frame 2020-06-01 15:02:53 -07:00
xfrm.h
xsk_buff_pool.h