ipc,namespace: fix free vs allocation race
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesIn review
- v22 patches 2 repliesSuperseded
- v12 patches 1 replySuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ipc,namespace: make ipc namespace allocation wait for pending freeipc/ | +16 | 0 replies | |
| 2/2 | ipc,namespace: batch free ipc_namespace structuresfs/ include/ ipc/ +2 more | +25 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Giuseppe Scrivano |
|---|---|
| Series | T-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] ipc,namespace: fix free vs allocation race
The IPC namespace code frees ipc_namespace structures asynchronously, via a work queue item. This results in ipc_namespace structures being freed very slowly, and the allocation path getting false failures since the to-be-freed ipc_namespace structures have not been freed yet.
Fix that by having the allocator wait when there are ipc_namespace structures pending to be freed.
Also speed up the freeing of ipc_namespace structures. We had some discussions about this last year, and ended up trying out various "nicer" ideas that did not work, so I went back to the original, with Al Viro's suggestion for a helper function:
https://lore.kernel.org/all/[email protected]/
This series fixes both the false allocation failures, and the slow freeing of ipc_namespace structures.
v3: remove mq_put_mnt (thank you Giuseppe)
v2: a few more fs/namespace.c cleanups suggested by Al Viro (thank you!)