Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e25338bc11fa8e41e44e4db5b5101e3d882dc5b
Commit:     0e25338bc11fa8e41e44e4db5b5101e3d882dc5b
Parent:     2ea81868d8fba0bb56d7b45a08cc5f15dd2c6bb2
Author:     Eric W. Biederman <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:52:54 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:31 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/sparc/kernel/sys_sunos.c     |   10 ++++++----
 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 0bf8c16..da6606f 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;
 }
 
diff --git a/arch/sparc64/kernel/sys_sunos32.c 
b/arch/sparc64/kernel/sys_sunos32.c
index 2ebc2c0..4cff95b 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
        return ret;
 }
 
-extern int kill_pg(int, int, int);
 asmlinkage int sunos_killpg(int pgrp, int sig)
 {
-       return kill_pg(pgrp, sig, 0);
+       int ret;
+
+       rcu_read_lock();
+       ret = -EINVAL;
+       if (pgrp > 0)
+               ret = kill_pgrp(find_pid(pgrp), sig, 0);
+       rcu_read_unlock();
+
+       return ret;
 }
 
 asmlinkage int sunos_audit(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to