Date: Thu, 26 May 2011 18:54:07 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222320 - head/sys/kern Message-ID: <201105261854.p4QIs7sE076712@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu May 26 18:54:07 2011 New Revision: 222320 URL: http://svn.freebsd.org/changeset/base/222320 Log: Fix support for RACCT_CORE by merging forgotten file. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu May 26 18:22:49 2011 (r222319) +++ head/sys/kern/kern_sig.c Thu May 26 18:54:07 2011 (r222320) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/posix4.h> #include <sys/pioctl.h> +#include <sys/racct.h> #include <sys/resourcevar.h> #include <sys/sdt.h> #include <sys/sbuf.h> @@ -3173,14 +3174,15 @@ coredump(struct thread *td) * if it is larger than the limit. */ limit = (off_t)lim_cur(p, RLIMIT_CORE); - PROC_UNLOCK(p); - if (limit == 0) { + if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) { + PROC_UNLOCK(p); #ifdef AUDIT audit_proc_coredump(td, name, EFBIG); #endif free(name, M_TEMP); return (EFBIG); } + PROC_UNLOCK(p); restart: NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105261854.p4QIs7sE076712>