cap_set_pg() neither needs nor wants to examine the global tasklist; convert it to for_each_task_pid(). capability.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff -urpN wli-2.5.50-bk5-4/kernel/capability.c wli-2.5.50-bk5-5/kernel/capability.c --- wli-2.5.50-bk5-4/kernel/capability.c 2002-11-27 14:35:50.000000000 -0800 +++ wli-2.5.50-bk5-5/kernel/capability.c 2002-12-05 20:11:35.000000000 -0800 @@ -84,13 +84,15 @@ static inline void cap_set_pg(int pgrp, kernel_cap_t *inheritable, kernel_cap_t *permitted) { - task_t *g, *target; - - do_each_thread(g, target) { - if (target->pgrp != pgrp) - continue; - security_capset_set(target, effective, inheritable, permitted); - } while_each_thread(g, target); + task_t *g, *target; + struct list_head *l; + struct pid *pid; + + for_each_task_pid(pgrp, PIDTYPE_PGID, g, l, pid) { + target = g; + while_each_thread(g, target) + security_capset_set(target, effective, inheritable, permitted); + } } /*