HomeFreeBSD

Don't set the mirror GEOM softc to NULL in g_mirror_destroy().

Description

Don't set the mirror GEOM softc to NULL in g_mirror_destroy().

At this point we have not rendezvous'ed with the mirror worker thread, and
I/O may still be in flight. Various I/O completion paths expect to be able
to obtain a reference to the mirror softc from the GEOM, so setting it to
NULL may result in various NULL pointer dereferences if the mirror is
stopped with -f or the kernel is shut down while a mirror is
synchronizing. The worker thread will clear the softc pointer before
exiting.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

Details

Provenance
markjAuthored on
Parents
rS316866: Check for a provider error before enqueuing mirror I/O.
Branches
Unknown
Tags
Unknown