acrn-kernel/net/core
Jakub Kicinski a2232f29bf net: fix removing a namespace with conflicting altnames
[ Upstream commit d09486a04f5da0a812c26217213b89a3b1acf836 ]

Mark reports a BUG() when a net namespace is removed.

    kernel BUG at net/core/dev.c:11520!

Physical interfaces moved outside of init_net get "refunded"
to init_net when that namespace disappears. The main interface
name may get overwritten in the process if it would have
conflicted. We need to also discard all conflicting altnames.
Recent fixes addressed ensuring that altnames get moved
with the main interface, which surfaced this problem.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Link: https://lore.kernel.org/all/CAEmTpZFZ4Sv3KwqFOY2WKDHeZYdi0O7N5H1nTvcGp=SAEavtDg@mail.gmail.com/
Fixes: 7663d52209 ("net: check for altname conflicts when changing netdev's netns")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-31 16:17:04 -08:00
..
Makefile
bpf_sk_storage.c
datagram.c
dev.c net: fix removing a namespace with conflicting altnames 2024-01-31 16:17:04 -08:00
dev.h net: fix removing a namespace with conflicting altnames 2024-01-31 16:17:04 -08:00
dev_addr_lists.c
dev_addr_lists_test.c
dev_ioctl.c
drop_monitor.c drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group 2023-12-13 18:39:12 +01:00
dst.c ipv6: remove max_size check inline with ipv4 2024-01-15 18:54:51 +01:00
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: sockmap, updating the sg structure should also update curr 2023-12-13 18:39:11 +01:00
flow_dissector.c
flow_offload.c
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c
lwtunnel.c
neighbour.c neighbour: Don't let neigh_forced_gc() disable preemption for long 2024-01-20 11:50:07 +01:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c net: page_pool: add missing free_percpu when page_pool_init fail 2023-11-20 11:52:16 +01:00
pktgen.c
ptp_classifier.c
request_sock.c tcp: make sure init the accept_queue's spinlocks once 2024-01-31 16:17:03 -08:00
rtnetlink.c Revert "net: rtnetlink: Enslave device before bringing it up" 2024-01-25 15:27:43 -08:00
scm.c io_uring/af_unix: disable sending io_uring over sockets 2023-12-13 18:39:17 +01:00
secure_seq.c
selftests.c
skbuff.c net: annotate data-races around sk->sk_tsflags 2024-01-10 17:10:23 +01:00
skmsg.c bpf, sockmap: af_unix stream sockets need to hold ref for pair sock 2024-01-10 17:10:32 +01:00
sock.c udp: fix busy polling 2024-01-31 16:17:04 -08:00
sock_destructor.h
sock_diag.c
sock_map.c bpf: syzkaller found null ptr deref in unix_bpf proto add 2024-01-10 17:10:36 +01:00
sock_reuseport.c
stream.c net: Return error from sk_stream_wait_connect() if sk_wait_event() fails 2024-01-01 12:38:56 +00:00
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c