Skip to content

Commit

Permalink
[PATCH] signal: use kill_pgrp not kill_pg in the sunos compatibility …
Browse files Browse the repository at this point in the history
…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 <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 12, 2007
1 parent 2ea8186 commit 0e25338
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 6 additions & 4 deletions arch/sparc/kernel/sys_sunos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
11 changes: 9 additions & 2 deletions arch/sparc64/kernel/sys_sunos32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e25338

Please sign in to comment.