From 0e25338bc11fa8e41e44e4db5b5101e3d882dc5b Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 12 Feb 2007 00:52:54 -0800 Subject: [PATCH] signal: use kill_pgrp not kill_pg in the sunos compatibility code I am slowly moving to a model where all process killing is struct pid based instead of pid_t based. The sunos compatibility code is one of the last users of the old pid_t based kill_pg in the kernel. By being complete I allow for the future removal of kill_pg from the kernel, which will ensure I don't miss something. Signed-off-by: Eric W. Biederman Cc: Alan Cox Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sparc/kernel/sys_sunos.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 0bf8c165fc9..da6606f0cff 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -859,14 +859,16 @@ asmlinkage int sunos_wait4(pid_t pid, unsigned int __user *stat_addr, return ret; } -extern int kill_pg(int, int, int); asmlinkage int sunos_killpg(int pgrp, int sig) { int ret; - lock_kernel(); - ret = kill_pg(pgrp, sig, 0); - unlock_kernel(); + rcu_read_lock(); + ret = -EINVAL; + if (pgrp > 0) + ret = kill_pgrp(find_pid(pgrp), sig, 0); + rcu_read_unlock(); + return ret; } -- cgit v1.2.3