Commit 622f973
Paolo Abeni
net: clear sk->sk_ino in sk_set_socket(sk, NULL)
JIRA: https://issues.redhat.com/browse/RHEL-115597
Upstream commit:
commit 87ebb62
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Sep 17 13:53:37 2025 +0000
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: 5d6b58c ("net: lockless sock_i_ino()")
Closes: https://lore.kernel.org/netdev/aMhX-VnXkYDpKd9V@google.com/
Closes: checkpoint-restore/criu#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>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 8a14026 commit 622f973
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2032 | 2032 | | |
2033 | 2033 | | |
2034 | 2034 | | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
2035 | 2038 | | |
2036 | 2039 | | |
2037 | 2040 | | |
| |||
2053 | 2056 | | |
2054 | 2057 | | |
2055 | 2058 | | |
2056 | | - | |
2057 | 2059 | | |
2058 | 2060 | | |
2059 | 2061 | | |
| |||
0 commit comments