pid: perform free_pid() calls outside of tasklist_lock
As the clone side already executes pid allocation with only pidmap_lock held, issuing free_pid() while still holding tasklist_lock exacerbates total hold time of the latter. More things may show up later which require initial clean up with the lock held and allow finishing without it. For that reason a struct to collect such work is added instead of merely passing the pid array. Reviewed-by:Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20250206164415.450051-5-mjguzik@gmail.com Acked-by:
"Liam R. Howlett" <Liam.Howlett@Oracle.com> Signed-off-by:
Christian Brauner <brauner@kernel.org>
Loading
Please sign in to comment