From: Andrei Vagin <avagin@google.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
syzbot+50603c05bbdf4dfdaffa@syzkaller.appspotmail.com,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Kuniyuki Iwashima <kuniyu@google.com>
Subject: Re: [PATCH net] net: lockless sock_i_ino()
Date: Mon, 15 Sep 2025 18:16:25 +0000 [thread overview]
Message-ID: <aMhX-VnXkYDpKd9V@google.com> (raw)
In-Reply-To: <20250902183603.740428-1-edumazet@google.com>
On Tue, Sep 02, 2025 at 06:36:03PM +0000, Eric Dumazet wrote:
> @@ -2056,6 +2058,10 @@ static inline int sk_rx_queue_get(const struct sock *sk)
> static inline void sk_set_socket(struct sock *sk, struct socket *sock)
> {
> sk->sk_socket = sock;
> + if (sock) {
> + WRITE_ONCE(sk->sk_uid, SOCK_INODE(sock)->i_uid);
> + WRITE_ONCE(sk->sk_ino, SOCK_INODE(sock)->i_ino);
> + }
Hi Eric.
This change breaks CRIU [1]. The issue is that socket_diag reports two
sockets with the same inode number. It seems inet_csk_clone_lock copies
sk->sk_ino to child sockets, but sk_set_socket doesn’t reset it to zero
when sock is NULL.
[1] https://github.com/checkpoint-restore/criu/issues/2744
Thanks,
Andrei
next prev parent reply other threads:[~2025-09-15 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 18:36 [PATCH net] net: lockless sock_i_ino() Eric Dumazet
2025-09-03 5:26 ` Kuniyuki Iwashima
2025-09-03 7:41 ` Sebastian Andrzej Siewior
2025-09-03 23:30 ` patchwork-bot+netdevbpf
2025-09-15 18:16 ` Andrei Vagin [this message]
2025-09-15 18:51 ` Eric Dumazet
2025-09-15 19:01 ` Andrei Vagin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aMhX-VnXkYDpKd9V@google.com \
--to=avagin@google.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+50603c05bbdf4dfdaffa@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.