Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e25338b authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds
Browse files

[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: default avatarEric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2ea81868
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -859,14 +859,16 @@ asmlinkage int sunos_wait4(pid_t pid, unsigned int __user *stat_addr,
	return ret;
	return ret;
}
}


extern int kill_pg(int, int, int);
asmlinkage int sunos_killpg(int pgrp, int sig)
asmlinkage int sunos_killpg(int pgrp, int sig)
{
{
	int ret;
	int ret;


	lock_kernel();
	rcu_read_lock();
	ret = kill_pg(pgrp, sig, 0);
	ret = -EINVAL;
	unlock_kernel();
	if (pgrp > 0)
		ret = kill_pgrp(find_pid(pgrp), sig, 0);
	rcu_read_unlock();

	return ret;
	return ret;
}
}


+9 −2
Original line number Original line Diff line number Diff line
@@ -824,10 +824,17 @@ asmlinkage int sunos_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, in
	return ret;
	return ret;
}
}


extern int kill_pg(int, int, int);
asmlinkage int sunos_killpg(int pgrp, int sig)
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)
asmlinkage int sunos_audit(void)