HomeFreeBSD

Avoid dropping the topology lock in gmirror's dumpconf implementation.

Description

Avoid dropping the topology lock in gmirror's dumpconf implementation.

Doing so introduces races which can lead to a use-after-free when
grabbing a snapshot of the GEOM mesh.

To ensure that a mirror's disk list remains stable, change its locking
protocol: both the softc lock and the topology lock are now required
to modify the list, so either lock is sufficient for traversal.

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

Details

Provenance
markjAuthored on
Parents
rS333277: Currently in_pcbfree will unconditionally wunlock the pcbinfo lock
Branches
Unknown
Tags
Unknown