Re: [PATCH 1/2] kernel/sys: only take tasklist_lock for get/setpriority(PRIO_PGRP)
On 08/16, Davidlohr Bueso wrote: > > Suggested-by: Oleg Nesterov > Signed-off-by: Davidlohr Bueso > --- > kernel/sys.c | 16 Acked-by: Oleg Nesterov
[PATCH 1/2] kernel/sys: only take tasklist_lock for get/setpriority(PRIO_PGRP)
PRIO_PGRP needs the tasklist_lock mainly to serialize vs setpgid(2), to protect against any concurrent change_pid(PIDTYPE_PGID) that can move the task from one hlist to another while iterating. However, the remaining can only rely only on RCU: PRIO_PROCESS only does the task lookup and never iter