Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2007 14:45:24 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 120558 for review
Message-ID:  <200705291445.l4TEjOqo072275@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=120558

Change 120558 by rdivacky@rdivacky_witten on 2007/05/29 14:44:59

	Dont allow zero or negative pid/tid arguments to tgkill/tkill.

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_signal.c#2 edit

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_signal.c#2 (text+ko) ====

@@ -550,8 +550,8 @@
 	ka.pid = args->pid;
 	ka.signum = args->sig;
 
-	if (args->tgid == -1)
-	   	return linux_kill(td, &ka);
+	if (args->pid <= 0 || args->tgid <= 0)
+		return EINVAL;
 
 	if ((p = pfind(args->pid)) == NULL)
 	      	return ESRCH;
@@ -583,6 +583,8 @@
 	if (ldebug(tkill))
 		printf(ARGS(tkill, "%i, %i"), args->tid, args->sig);
 #endif
+	if (args->tid <= 0)
+		return EINVAL;
 
 	return (linux_kill(td, (struct linux_kill_args *) args));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705291445.l4TEjOqo072275>