[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <B2998825-F963-4BF6-BD6F-7665E51DBAE8@linux.ibm.com>
Date: Fri, 1 Jul 2022 21:37:20 +0530
From: Sachin Sant <sachinp@...ux.ibm.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Leonard Crestez <cdleonard@...il.com>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next] af_unix: Put a named socket in the global
hash table.
> Note when dumping sockets by sock_diag, procfs, and bpf_iter, they are
> filtered only by netns. In other words, sockets with different netns
> and the same mount ns are skipped while iterating sockets. Thus, we
> need a fix only for finding a peer socket.
>
> This patch adds a global hash table for named sockets, links them with
> sk_bind_node, and uses it in unix_find_socket_byinode(). By doing so,
> we can keep all sockets in per-netns hash tables and dump them easily.
>
> Thank Sachin Sant and Leonard Crestez for reports, logs and a reproducer.
>
> Fixes: cf2f225e2653 ("af_unix: Put a socket into a per-netns hash table.")
> Reported-by: Sachin Sant <sachinp@...ux.ibm.com>
> Reported-by: Leonard Crestez <cdleonard@...il.com>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> net/unix/af_unix.c | 47 ++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 37 insertions(+), 10 deletions(-)
>
Thanks for the fix.
The patch fixes the reported problem.
Tested-by: Sachin Sant <sachinp@...ux.ibm.com>
- Sachin
Powered by blists - more mailing lists