diff options
author | Eric Dumazet <edumazet@google.com> | 2025-09-17 13:53:37 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-18 07:47:17 -0700 |
commit | 87ebb628a5acb892eba41ef1d8989beb8f036034 (patch) | |
tree | 85424bc4168c4b8ea0fce704ab4a1cceb5ef6314 /tools/docs/lib/parse_data_structs.py | |
parent | 3fbfe251cc9f6d391944282cdb9bcf0bd02e01f8 (diff) |
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>
Diffstat (limited to 'tools/docs/lib/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions