All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ipc,namespace: fix free vs allocation race
@ 2023-01-26 20:57 Rik van Riel
  2023-01-26 20:57 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
  2023-01-26 20:57 ` [PATCH 2/2] ipc,namespace: batch free ipc_namespace structures Rik van Riel
  0 siblings, 2 replies; 6+ messages in thread
From: Rik van Riel @ 2023-01-26 20:57 UTC (permalink / raw)
  To: linux-kernel, viro, kernel-team, linux-fsdevel, gscrivan

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/Yg8StKzTWh+7FLuA@zeniv-ca.linux.org.uk/

This series fixes both the false allocation failures, and the slow
freeing of ipc_namespace structures.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v2 0/2] ipc,namespace: fix free vs allocation race
@ 2023-01-27  1:15 Rik van Riel
  2023-01-27  1:15 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
  0 siblings, 1 reply; 6+ messages in thread
From: Rik van Riel @ 2023-01-27  1:15 UTC (permalink / raw)
  To: viro, linux-kernel, kernel-team, linux-fsdevel, gscrivan

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/Yg8StKzTWh+7FLuA@zeniv-ca.linux.org.uk/

This series fixes both the false allocation failures, and the slow
freeing of ipc_namespace structures.

v2: a few more fs/namespace.c cleanups suggested by Al Viro (thank you!)



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v3 0/2] ipc,namespace: fix free vs allocation race
@ 2023-01-27 18:46 Rik van Riel
  2023-01-27 18:46 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
  0 siblings, 1 reply; 6+ messages in thread
From: Rik van Riel @ 2023-01-27 18:46 UTC (permalink / raw)
  To: viro, linux-kernel, kernel-team, linux-fsdevel, gscrivan

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/Yg8StKzTWh+7FLuA@zeniv-ca.linux.org.uk/

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!)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-27 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 20:57 [PATCH 0/2] ipc,namespace: fix free vs allocation race Rik van Riel
2023-01-26 20:57 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
2023-01-26 20:57 ` [PATCH 2/2] ipc,namespace: batch free ipc_namespace structures Rik van Riel
2023-01-26 21:14   ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2023-01-27  1:15 [PATCH v2 0/2] ipc,namespace: fix free vs allocation race Rik van Riel
2023-01-27  1:15 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
2023-01-27 18:46 [PATCH v3 0/2] ipc,namespace: fix free vs allocation race Rik van Riel
2023-01-27 18:46 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel

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.