diff options
-rw-r--r-- | arch/sparc/kernel/sys_sunos.c | 10 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sunos32.c | 11 |
2 files changed, 15 insertions, 6 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, | |||
859 | return ret; | 859 | return ret; |
860 | } | 860 | } |
861 | 861 | ||
862 | extern int kill_pg(int, int, int); | ||
863 | asmlinkage int sunos_killpg(int pgrp, int sig) | 862 | asmlinkage int sunos_killpg(int pgrp, int sig) |
864 | { | 863 | { |
865 | int ret; | 864 | int ret; |
866 | 865 | ||
867 | lock_kernel(); | 866 | rcu_read_lock(); |
868 | ret = kill_pg(pgrp, sig, 0); | 867 | ret = -EINVAL; |
869 | unlock_kernel(); | 868 | if (pgrp > 0) |
869 | ret = kill_pgrp(find_pid(pgrp), sig, 0); | ||
870 | rcu_read_unlock(); | ||
871 | |||
870 | return ret; | 872 | return ret; |
871 | } | 873 | } |
872 | 874 | ||
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 2ebc2c051383..4cff95b7b3a4 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -824,10 +824,17 @@ asmlinkage int sunos_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, in | |||
824 | return ret; | 824 | return ret; |
825 | } | 825 | } |
826 | 826 | ||
827 | extern int kill_pg(int, int, int); | ||
828 | asmlinkage int sunos_killpg(int pgrp, int sig) | 827 | asmlinkage int sunos_killpg(int pgrp, int sig) |
829 | { | 828 | { |
830 | return kill_pg(pgrp, sig, 0); | 829 | int ret; |
830 | |||
831 | rcu_read_lock(); | ||
832 | ret = -EINVAL; | ||
833 | if (pgrp > 0) | ||
834 | ret = kill_pgrp(find_pid(pgrp), sig, 0); | ||
835 | rcu_read_unlock(); | ||
836 | |||
837 | return ret; | ||
831 | } | 838 | } |
832 | 839 | ||
833 | asmlinkage int sunos_audit(void) | 840 | asmlinkage int sunos_audit(void) |