Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2021 01:45:08 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e7d30206032a - stable/13 - Fix a braino in previous.
Message-ID:  <202106130145.15D1j8XW051984@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7d30206032aac1c9e9fe4f02b75cbdf61f44dfa

commit e7d30206032aac1c9e9fe4f02b75cbdf61f44dfa
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-05-22 19:48:31 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-06-13 01:22:34 +0000

    Fix a braino in previous.
    
    (cherry picked from commit 48235c377f960050e9129aa847d7d73019561c82)
---
 sys/kern/vfs_vnops.c | 2 --
 sys/sys/ktrace.h     | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 95b6821bdff5..9c3d261a25c4 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -2372,13 +2372,11 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
 	if ((uoff_t)uio->uio_offset + uio->uio_resid < lim)
 		return (0);
 
-#ifdef KTRACE
 	if (!ktr_write || ktr_filesize_limit_signal) {
 		PROC_LOCK(td->td_proc);
 		kern_psignal(td->td_proc, SIGXFSZ);
 		PROC_UNLOCK(td->td_proc);
 	}
-#endif
 	return (EFBIG);
 }
 
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index 1fcac8e0cd26..739f5a5d7ea0 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -308,8 +308,12 @@ void	ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *,
 #define ktrstat_error(s, error) \
 	ktrstruct_error("stat", (s), sizeof(struct stat), error)
 extern u_int ktr_geniosize;
+#ifdef	KTRACE
 extern int ktr_filesize_limit_signal;
 #else
+#define	ktr_filesize_limit_signal 0
+#endif
+#else
 
 #include <sys/cdefs.h>
 



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