Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108084520
D5413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
996 B
Referenced Files
None
Subscribers
None
D5413.diff
View Options
Index: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
===================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -115,27 +115,14 @@
if (error == 0) {
char *old_physpath;
+ /* g_topology lock ensures that vdev has not been closed */
+ g_topology_assert();
old_physpath = vd->vdev_physpath;
vd->vdev_physpath = spa_strdup(physpath);
spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE);
- if (old_physpath != NULL) {
- int held_lock;
-
- held_lock = spa_config_held(spa, SCL_STATE, RW_WRITER);
- if (held_lock == 0) {
- g_topology_unlock();
- spa_config_enter(spa, SCL_STATE, FTAG,
- RW_WRITER);
- }
-
+ if (old_physpath != NULL)
spa_strfree(old_physpath);
-
- if (held_lock == 0) {
- spa_config_exit(spa, SCL_STATE, FTAG);
- g_topology_lock();
- }
- }
}
g_free(physpath);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 22, 6:09 AM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16025863
Default Alt Text
D5413.diff (996 B)
Attached To
Mode
D5413: Fix rare double free in vdev_geom_attrchanged
Attached
Detach File
Event Timeline
Log In to Comment