PERFORCE change 120558 for review
Roman Divacky
rdivacky at FreeBSD.org
Tue May 29 14:45:25 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=120558
Change 120558 by rdivacky at 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));
}
More information about the p4-projects
mailing list