1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-16 03:25:43 +00:00
Eric Dumazet 87ebb628a5 net: clear sk->sk_ino in sk_set_socket(sk, NULL)
Andrei Vagin reported that blamed commit broke CRIU.

Indeed, while we want to keep sk_uid unchanged when a socket
is cloned, we want to clear sk->sk_ino.

Otherwise, sock_diag might report multiple sockets sharing
the same inode number.

Move the clearing part from sock_orphan() to sk_set_socket(sk, NULL),
called both from sock_orphan() and sk_clone_lock().

Fixes: 5d6b58c932ec ("net: lockless sock_i_ino()")
Closes: https://lore.kernel.org/netdev/aMhX-VnXkYDpKd9V@google.com/
Closes: https://github.com/checkpoint-restore/criu/issues/2744
Reported-by: Andrei Vagin <avagin@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Andrei Vagin <avagin@google.com>
Link: https://patch.msgid.link/20250917135337.1736101-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-18 07:47:17 -07:00
..
2024-10-08 15:33:49 -07:00
2024-12-09 14:44:59 -08:00
2025-01-20 12:16:04 -08:00
2025-04-24 17:03:45 -07:00
2025-07-08 18:05:25 -07:00
2025-07-07 16:55:54 -07:00
2025-03-24 10:26:53 +00:00
2024-11-13 18:49:50 -08:00
2025-07-02 14:32:30 -07:00
2024-12-06 17:43:08 -08:00
2025-04-15 08:21:46 -07:00
2024-11-30 13:41:50 -08:00
2024-11-21 08:28:08 -08:00
2025-06-27 15:34:19 -07:00
2025-04-11 18:58:10 -07:00
2025-07-04 09:32:35 +02:00
2025-04-11 18:58:10 -07:00
2025-08-06 07:32:52 +03:00
2025-07-11 11:00:57 -07:00