af_unix: Fix regression by the per-netns hash table series.
Status from this message: This series was applied to netdev/net-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 1 replyApplied 2/2
- v22 patches 0 repliesSuperseded
- v11 patch 4 repliesSuperseded
Changes in v3 from the cover letter
* 1st: Update changelog s/named/pathname/
* 2nd: Fix checkpatch.pl CHECK by --strict option
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | af_unix: Put pathname sockets in the global hash table.net/ | +37 | 1 reply | Applied |
| 2/2 | selftests: net: af_unix: Test connect() with different netns.tools/ tools/ tools/ | +152 | 0 replies | Applied |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Sachin Sant | Nathan Chancellor | Leonard Crestez |
|---|---|---|---|
| 1/2 | T-b | T-b | T-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v3 net-next 0/2] af_unix: Fix regression by the per-netns hash table series.
The series 6dd4142fb5a9 ("Merge branch 'af_unix-per-netns-socket-hash'") replaced a global hash table with per-netns tables, which caused regression reported in the links below. [0][1]
When a pathname socket is visible, any socket with the same type has to be able to connect to it even in different netns. The series puts all sockets into each namespace's hash table, making it impossible to look up a visible socket in different netns.
On the other hand, while dumping sockets, they are filtered by netns. To keep such code simple, let's add a new global hash table only for pathname sockets and link them with sk_bind_node. Then we can keep all sockets in each per-netns table and look up pathname sockets via the global table.
[0]: https://lore.kernel.org/netdev/[email protected]/
[1]: https://lore.kernel.org/netdev/[email protected]/
Changes:
v3:
* 1st: Update changelog s/named/pathname/
* 2nd: Fix checkpatch.pl CHECK by --strict option
v2: https://lore.kernel.org/netdev/[email protected]/
* Add selftest
v1: https://lore.kernel.org/netdev/[email protected]/
Kuniyuki Iwashima (2):
af_unix: Put pathname sockets in the global hash table.
selftests: net: af_unix: Test connect() with different netns.
net/unix/af_unix.c | 47 ++++-- tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/af_unix/Makefile | 3 +- .../selftests/net/af_unix/unix_connect.c | 149 ++++++++++++++++++ 4 files changed, 189 insertions(+), 11 deletions(-) create mode 100644 tools/testing/selftests/net/af_unix/unix_connect.c
Signature · 1 line
2.30.2