svn commit: r325722 - in head/sys: compat/linux kern

Mateusz Guzik mjg at FreeBSD.org
Sat Nov 11 18:10:10 UTC 2017


Author: mjg
Date: Sat Nov 11 18:10:09 2017
New Revision: 325722
URL: https://svnweb.freebsd.org/changeset/base/325722

Log:
  Use pfind_any in linux_rt_sigqueueinfo and kern_sigqueue

Modified:
  head/sys/compat/linux/linux_signal.c
  head/sys/kern/kern_sig.c

Modified: head/sys/compat/linux/linux_signal.c
==============================================================================
--- head/sys/compat/linux/linux_signal.c	Sat Nov 11 18:04:39 2017	(r325721)
+++ head/sys/compat/linux/linux_signal.c	Sat Nov 11 18:10:09 2017	(r325722)
@@ -748,8 +748,7 @@ linux_rt_sigqueueinfo(struct thread *td, struct linux_
 	sig = linux_to_bsd_signal(args->sig);
 
 	error = ESRCH;
-	if ((p = pfind(args->pid)) != NULL ||
-	    (p = zpfind(args->pid)) != NULL) {
+	if ((p = pfind_any(args->pid)) != NULL) {
 		error = p_cansignal(td, p, sig);
 		if (error != 0) {
 			PROC_UNLOCK(p);

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Sat Nov 11 18:04:39 2017	(r325721)
+++ head/sys/kern/kern_sig.c	Sat Nov 11 18:10:09 2017	(r325722)
@@ -1870,10 +1870,8 @@ kern_sigqueue(struct thread *td, pid_t pid, int signum
 	if (pid <= 0)
 		return (EINVAL);
 
-	if ((p = pfind(pid)) == NULL) {
-		if ((p = zpfind(pid)) == NULL)
-			return (ESRCH);
-	}
+	if ((p = pfind_any(pid)) == NULL)
+		return (ESRCH);
 	error = p_cansignal(td, p, signum);
 	if (error == 0 && signum != 0) {
 		ksiginfo_init(&ksi);


More information about the svn-src-head mailing list