mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Don't use LK_DRAIN before calling VOP_FSYNC() in the two further
panic cases for audit trail failure -- this doesn't contribute anything, and might arguably be wrong. MFC after: 1 week Requested by: attilio
This commit is contained in:
parent
bf7baa9eca
commit
bcbd871a3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179178
@ -259,7 +259,7 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data,
|
||||
* space, or ENOSPC returned by the vnode write call.
|
||||
*/
|
||||
if (audit_fail_stop) {
|
||||
VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
|
||||
VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
(void)VOP_FSYNC(vp, MNT_WAIT, curthread);
|
||||
VOP_UNLOCK(vp, 0);
|
||||
panic("Audit log space exhausted and fail-stop set.");
|
||||
@ -274,7 +274,7 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data,
|
||||
* lost, which may require an immediate system halt.
|
||||
*/
|
||||
if (audit_panic_on_write_fail) {
|
||||
VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
|
||||
VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
(void)VOP_FSYNC(vp, MNT_WAIT, curthread);
|
||||
VOP_UNLOCK(vp, 0);
|
||||
panic("audit_worker: write error %d\n", error);
|
||||
|
Loading…
Reference in New Issue
Block a user