summaryrefslogtreecommitdiffstats
path: root/lib/libgssapi/gss_display_name.c
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-04-12 19:11:14 +0000
committerasomers <asomers@FreeBSD.org>2016-04-12 19:11:14 +0000
commit2a0941fb20351d00765ce970ea44efcc0f389e3b (patch)
tree7e214f1efce7e020f0af85f84af5015188069167 /lib/libgssapi/gss_display_name.c
parent59b487552b970f0667b23ad1197bc0a224a5048c (diff)
downloadFreeBSD-src-2a0941fb20351d00765ce970ea44efcc0f389e3b.zip
FreeBSD-src-2a0941fb20351d00765ce970ea44efcc0f389e3b.tar.gz
Fix rare double free in vdev_geom_attrchanged
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Don't drop the g_topology_lock before freeing old_physpath. That opens up a race where one thread can call vdev_geom_attrchanged, set old_physpath, drop the g_topology_lock, then block trying to acquire the SCL_STATE lock. Then another thread can come into vdev_geom_attrchanged, set old_physpath to the same value, and proceed to free it. When the first thread resumes, it will free the same location. It turns out that the SCL_STATE lock isn't needed. It was originally added by gibbs to protect vd->vdev_physpath while updating the same. However, the update process subsequently was switched to an atomic operation (a pointer swap). Now, there is no need for the SCL_STATE lock, and hence no need to drop the g_topology_lock. Reviewed by: delphij MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D5413
Diffstat (limited to 'lib/libgssapi/gss_display_name.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud