Skip to content

signal_struct->count must die, initial changes

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4exit: exit_notify() can trust signal->notify_count < 0kernel/exit.c+2 -50 replies
2/4exit: change zap_other_threads() to count sub-threadsinclude/linux/sched.h kernel/signal.c+10 -90 replies
3/4exit: avoid sig->count in de_thread/__exit_signal synchronizationfs/exec.c kernel/exit.c+6 -70 replies
4/4exit: avoid sig->count in __exit_signal() to detect the group-dead casekernel/exit.c+3 -20 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRoland McGrathVeaceslav Falico
SeriesA-b A-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] signal_struct->count must die, initial changes

signal_struct->count in its current form must die.

- it has no reasons to be atomic_t

- it looks like a reference counter, but it is not

- otoh, we really need to make task->signal refcountable, just look at the extremely ugly task_rq_unlock_wait() called from __exit_signals().

- we should change the lifetime rules for task->signal, it should be pinned to task_struct. We have a lot of code which can be simplified after that.

- it is not needed! while the code is correct, any usage of this counter is artificial, except fs/proc uses it correctly to show the number of threads.

This series removes the usage of sig->count from exit pathes.

Oleg.