Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174845606
D60283.id188566.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
937 B
Referenced Files
None
Subscribers
None
D60283.id188566.diff
View Options
diff --git a/sys/kern/coredump_vnode.c b/sys/kern/coredump_vnode.c
--- a/sys/kern/coredump_vnode.c
+++ b/sys/kern/coredump_vnode.c
@@ -68,6 +68,7 @@
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/limits.h>
+#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
@@ -435,6 +436,7 @@
struct proc *p = td->td_proc;
struct ucred *cred = td->td_ucred;
struct vnode *vp;
+ struct mount *mp;
struct coredump_vnode_ctx wctx;
struct coredump_writer cdw = { };
struct flock lf;
@@ -470,6 +472,17 @@
goto out;
}
+ /*
+ * If the /dev/ufssuspend owner faulted, work around it.
+ */
+ mp = vp->v_mount;
+ if (mp != NULL && (mp->mnt_kern_flag & (MNTK_SUSPEND |
+ MNTK_SUSPENDED)) != 0 && mp->mnt_susp_owner->td_proc == p) {
+ VOP_UNLOCK(vp);
+ error = EBUSY;
+ goto out;
+ }
+
VOP_UNLOCK(vp);
/* Postpone other writers, including core dumps of other processes. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 7, 11:34 AM (5 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40216241
Default Alt Text
D60283.id188566.diff (937 B)
Attached To
Mode
D60283: kern/coredump_vnode.c: avoid dumping to the mount point we suspended
Attached
Detach File
Event Timeline
Log In to Comment