diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-12-29 10:37:32 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-12-29 10:37:32 +0000 |
commit | 46f7cb9d3b2bda20b9497c87e5bcd148fba12ca2 (patch) | |
tree | 4f9d5721385acef7659fd84fcbb8d9f97f8cf25a | |
parent | e74edb3876592f28b81f5059e2418c4bcb42699b (diff) | |
download | FreeBSD-src-46f7cb9d3b2bda20b9497c87e5bcd148fba12ca2.zip FreeBSD-src-46f7cb9d3b2bda20b9497c87e5bcd148fba12ca2.tar.gz |
Add a witness sleep warning to canon_path(), which invokes vput() and hence
may perform an unbounded sleep. Remove an XXX comment suggesting that one
be added.
Obtained from: TrustedBSD Project
-rw-r--r-- | sys/security/audit/audit_arg.c | 3 | ||||
-rw-r--r-- | sys/security/audit/audit_bsm_klib.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index 76aeb4d..f4f9373 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -669,9 +669,6 @@ audit_arg_upath(struct thread *td, char *upath, u_int64_t flag) if (ar == NULL) return; - /* - * XXXAUDIT: Witness warning for possible sleep here? - */ KASSERT((flag == ARG_UPATH1) || (flag == ARG_UPATH2), ("audit_arg_upath: flag %llu", (unsigned long long)flag)); KASSERT((flag != ARG_UPATH1) || (flag != ARG_UPATH2), diff --git a/sys/security/audit/audit_bsm_klib.c b/sys/security/audit/audit_bsm_klib.c index 7844ef9..809214f 100644 --- a/sys/security/audit/audit_bsm_klib.c +++ b/sys/security/audit/audit_bsm_klib.c @@ -488,6 +488,9 @@ canon_path(struct thread *td, char *path, char *cpath) struct filedesc *fdp; int cisr, error, vfslocked; + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "canon_path() at %s:%d", __FILE__, __LINE__); + fdp = td->td_proc->p_fd; bufp = path; cisr = 0; |