From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx> Subject: [PATCH] Use task_pgrp() and task_session in binfmt Use container friendly interfaces task_pgrp() and task_session() in binfmt files Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx> Cc: Cedric Le Goater <clg@xxxxxxxxxx> Cc: Dave Hansen <haveblue@xxxxxxxxxx> Cc: Serge Hallyn <serue@xxxxxxxxxx> Cc: containers@xxxxxxxxxxxxxx --- fs/binfmt_elf.c | 8 ++++---- fs/binfmt_elf_fdpic.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) Index: lx26-20-mm1/fs/binfmt_elf.c =================================================================== --- lx26-20-mm1.orig/fs/binfmt_elf.c 2007-02-16 14:32:50.000000000 -0800 +++ lx26-20-mm1/fs/binfmt_elf.c 2007-02-16 15:42:26.000000000 -0800 @@ -1319,8 +1319,8 @@ static void fill_prstatus(struct elf_prs prstatus->pr_sighold = p->blocked.sig[0]; prstatus->pr_pid = p->pid; prstatus->pr_ppid = p->parent->pid; - prstatus->pr_pgrp = process_group(p); - prstatus->pr_sid = process_session(p); + prstatus->pr_pgrp = pid_nr(task_pgrp(p)); + prstatus->pr_sid = pid_nr(task_session(p)); if (thread_group_leader(p)) { /* * This is the record for the group leader. Add in the @@ -1365,8 +1365,8 @@ static int fill_psinfo(struct elf_prpsin psinfo->pr_pid = p->pid; psinfo->pr_ppid = p->parent->pid; - psinfo->pr_pgrp = process_group(p); - psinfo->pr_sid = process_session(p); + psinfo->pr_pgrp = pid_nr(task_pgrp(p)); + psinfo->pr_sid = pid_nr(task_session(p)); i = p->state ? ffz(~p->state) + 1 : 0; psinfo->pr_state = i; Index: lx26-20-mm1/fs/binfmt_elf_fdpic.c =================================================================== --- lx26-20-mm1.orig/fs/binfmt_elf_fdpic.c 2007-02-16 14:32:50.000000000 -0800 +++ lx26-20-mm1/fs/binfmt_elf_fdpic.c 2007-02-16 15:42:26.000000000 -0800 @@ -1321,8 +1321,8 @@ static void fill_prstatus(struct elf_prs prstatus->pr_sighold = p->blocked.sig[0]; prstatus->pr_pid = p->pid; prstatus->pr_ppid = p->parent->pid; - prstatus->pr_pgrp = process_group(p); - prstatus->pr_sid = process_session(p); + prstatus->pr_pgrp = pid_nr(task_pgrp(p)); + prstatus->pr_sid = pid_nr(task_session(p)); if (thread_group_leader(p)) { /* * This is the record for the group leader. Add in the @@ -1370,8 +1370,8 @@ static int fill_psinfo(struct elf_prpsin psinfo->pr_pid = p->pid; psinfo->pr_ppid = p->parent->pid; - psinfo->pr_pgrp = process_group(p); - psinfo->pr_sid = process_session(p); + psinfo->pr_pgrp = pid_nr(task_pgrp(p)); + psinfo->pr_sid = pid_nr(task_session(p)); i = p->state ? ffz(~p->state) + 1 : 0; psinfo->pr_state = i; _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxx https://lists.osdl.org/mailman/listinfo/containers