kernel_samsung_a53x/net/ipv6
Zhengchao Shao bdf80380fa ipv6: init the accept_queue's spinlocks in inet6_create
[ Upstream commit 435e202d645c197dcfd39d7372eb2a56529b6640 ]

In commit 198bc90e0e73("tcp: make sure init the accept_queue's spinlocks
once"), the spinlocks of accept_queue are initialized only when socket is
created in the inet4 scenario. The locks are not initialized when socket
is created in the inet6 scenario. The kernel reports the following error:
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
Call Trace:
<TASK>
	dump_stack_lvl (lib/dump_stack.c:107)
	register_lock_class (kernel/locking/lockdep.c:1289)
	__lock_acquire (kernel/locking/lockdep.c:5015)
	lock_acquire.part.0 (kernel/locking/lockdep.c:5756)
	_raw_spin_lock_bh (kernel/locking/spinlock.c:178)
	inet_csk_listen_stop (net/ipv4/inet_connection_sock.c:1386)
	tcp_disconnect (net/ipv4/tcp.c:2981)
	inet_shutdown (net/ipv4/af_inet.c:935)
	__sys_shutdown (./include/linux/file.h:32 net/socket.c:2438)
	__x64_sys_shutdown (net/socket.c:2445)
	do_syscall_64 (arch/x86/entry/common.c:52)
	entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129)
RIP: 0033:0x7f52ecd05a3d
Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 73 01 c3 48 8b 0d ab a3 0e 00 f7 d8 64 89 01 48
RSP: 002b:00007f52ecf5dde8 EFLAGS: 00000293 ORIG_RAX: 0000000000000030
RAX: ffffffffffffffda RBX: 00007f52ecf5e640 RCX: 00007f52ecd05a3d
RDX: 00007f52ecc8b188 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f52ecf5de20 R08: 00007ffdae45c69f R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00007f52ecf5e640
R13: 0000000000000000 R14: 00007f52ecc8b060 R15: 00007ffdae45c6e0

Fixes: 198bc90e0e73 ("tcp: make sure init the accept_queue's spinlocks once")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240122102001.2851701-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:01 +01:00
..
ila Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netfilter Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
addrconf.c net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX 2024-11-18 12:11:48 +01:00
addrconf_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
addrlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
af_inet6.c ipv6: init the accept_queue's spinlocks in inet6_create 2024-11-18 12:13:01 +01:00
ah6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
anycast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
calipso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp6.c net: ipv6: fix return value check in esp_remove_trailer 2024-11-08 11:26:10 +01:00
esp6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib6_notifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib6_rules.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fou6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inet6_connection_sock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inet6_hashtables.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_checksum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_fib.c ipv6: fix potential NULL deref in fib6_add() 2024-11-18 12:11:38 +01:00
ip6_flowlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_gre.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_icmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_input.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_offload.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_output.c ipv6: avoid atomic fragment on GSO packets 2024-11-18 11:42:50 +01:00
ip6_tunnel.c ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim() 2024-11-18 12:12:38 +01:00
ip6_udp_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_vti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6mr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipcomp6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipv6_sockglue.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcast_snoop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mip6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ndisc.c net: change accept_ra_min_rtr_lft to affect all RA lifetimes 2024-11-08 11:25:47 +01:00
netfilter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
output_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protocol.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reassembly.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
route.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpl_iptunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seg6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seg6_hmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seg6_iptunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seg6_local.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syncookies.c dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. 2024-11-18 11:43:07 +01:00
sysctl_net_ipv6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_ipv6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcpv6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tunnel6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp_impl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udplite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_input.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_output.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_policy.c Revert "xfrm6: fix inet6_dev refcount underflow problem" 2024-11-17 19:38:30 +01:00
xfrm6_protocol.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_state.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00