diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/sys_sunos.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 0bf8c165fc92..da6606f0cffc 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; } |