kern/83192:

Maciej Zawadzinski mzawadzinski at gmail.com
Sat Jul 9 16:30:18 GMT 2005


>Number:         83192
>Category:       kern
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 09 16:30:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Maciej Zawadzinski
>Release:        5.4
>Organization:
>Environment:
FreeBSD x86.one.pl 5.4-STABLE FreeBSD 5.4-STABLE #14: Sat Jul  8 00:50:14 CEST 2005     mauser at x86.one.pl:/usr/obj/usr/src/sys/BETA  i386

>Description:
n/a, patch attached
>How-To-Repeat:
Set RLIMIT_CPU for the process, measure cpu time used and compare ;)
>Fix:
--- kern_synch.c.orig	Fri Jul  8 22:07:20 2005
+++ kern_synch.c	Fri Jul  8 22:07:47 2005
@@ -322,7 +322,7 @@
 	 * over max, arrange to kill the process in ast().
 	 */
 	if (p->p_cpulimit != RLIM_INFINITY &&
-	    p->p_runtime.sec > p->p_cpulimit) {
+	    p->p_runtime.sec >= p->p_cpulimit) {
 		p->p_sflag |= PS_XCPU;
 		td->td_flags |= TDF_ASTPENDING;
 	}
>Release-Note:
>Audit-Trail:
>Unformatted:
 Kernel allows processes to run 1 second over the cpu time limit ( set by setrlimit(RLIMIT_CPU,..); ). 
 X-Send-Pr-Version: www-2.3
 
 Kernel allows processes to run 1 second over the cpu time limit ( set by setrlimit(RLIMIT_CPU,..); ). 


More information about the freebsd-bugs mailing list