freebsd-dev/sys/geom
Andriy Gapon f0fa2af656 geom_slice: fix r325227, protect against multiple calls to g_slice_free
This geom does not immediately detach its consumer relying on the
wither-washer to do that.  Since that happens asynchronously we may get
additional spoiling events.  So, we need to account for that.

There are multiple options for fixing this issue like detaching
immediately or checking for G_CF_ORPHAN in g_slice_spoiled().
The most reliable and least intrusive fix seems to be setting
geom->softc to NULL on the first call and checking for NULL on
subsequent calls.  This is something that the code did before r325227.

Reported by:	David Wolfskill <david@catwhisker.org>,
		O. Hartmann <o.hartmann@walstatt.org>
Tested by:	David Wolfskill <david@catwhisker.org> (earlier version)
Discussed with:	mav
MFC after:	1 week
X-MFC with:	r325227
2017-11-01 10:53:10 +00:00
..
bde
cache
concat
eli Fix information leak in geli(8) integrity mode 2017-09-09 01:41:01 +00:00
gate
journal When read requests are sent from a filesystem running above g_journal, 2017-08-13 18:09:22 +00:00
label
linux_lvm
mirror Fix a lock leak in g_mirror_destroy(). 2017-10-27 17:05:14 +00:00
mountver Add back missing MTX_DEF, it still needs to be there. 2017-10-29 12:03:06 +00:00
multipath
nop
part The hard drive media device path contains the size of the partition, 2017-09-02 07:04:06 +00:00
raid
raid3
sched
shsec
stripe
uzip Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
vinum
virstor g_virstor.h: macro parenthesization 2017-06-30 22:01:18 +00:00
zero
geom_aes.c
geom_bsd_enc.c
geom_bsd.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_ccd.c
geom_ctl.c
geom_ctl.h
geom_dev.c Add support for compressed kernel dumps. 2017-10-25 00:51:00 +00:00
geom_disk.c Expose API to allow disks to ask for alias names in devfs. 2017-08-07 21:12:38 +00:00
geom_disk.h Display rotation rate and TRIM/UNMAP support in diskinfo(8) 2017-10-04 15:09:49 +00:00
geom_dump.c Add aliasing concept to geom. 2017-08-07 21:12:28 +00:00
geom_event.c
geom_flashmap.c
geom_fox.c Also provide a warning for geom_fox. 2017-08-09 16:37:37 +00:00
geom_int.h
geom_io.c
geom_kern.c
geom_map.c
geom_mbr_enc.c
geom_mbr.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_redboot.c
geom_slice.c geom_slice: fix r325227, protect against multiple calls to g_slice_free 2017-11-01 10:53:10 +00:00
geom_slice.h
geom_subr.c Clear G_CF_ORPHAN when attaching. This fixes cases where the same 2017-10-02 11:57:00 +00:00
geom_sunlabel_enc.c
geom_sunlabel.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_vfs.c Fix typo. 2017-05-18 08:25:07 +00:00
geom_vfs.h
geom_vol_ffs.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom.h Add aliasing concept to geom. 2017-08-07 21:12:28 +00:00
notes