Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137051337
D3050.id7614.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
719 B
Referenced Files
None
Subscribers
None
D3050.id7614.diff
View Options
Index: head/sys/geom/geom_dev.c
===================================================================
--- head/sys/geom/geom_dev.c
+++ head/sys/geom/geom_dev.c
@@ -401,6 +401,20 @@
#else
e = 0;
#endif
+
+ /*
+ * The vgonel(9) - caused by eg. forced unmount of devfs - calls
+ * VOP_CLOSE(9) on devfs vnode without any FREAD or FWRITE flags,
+ * which would result in zero deltas, which in turn would cause
+ * panic in g_access(9).
+ *
+ * Note that we cannot zero the counters (ie. do "r = cp->acr"
+ * etc) instead, because the consumer might be opened in another
+ * devfs instance.
+ */
+ if (r + w + e == 0)
+ return (EINVAL);
+
sc = cp->private;
mtx_lock(&sc->sc_mtx);
sc->sc_open += r + w + e;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 1:32 AM (19 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25859935
Default Alt Text
D3050.id7614.diff (719 B)
Attached To
Mode
D3050: Fix panic in GEOM on forced devfs unmount
Attached
Detach File
Event Timeline
Log In to Comment