Page MenuHomeFreeBSD

gmirror: Fix a bug introduced in r341674
ClosedPublic

Authored by cem on Dec 12 2018, 1:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 10:28 PM
Unknown Object (File)
Mon, Oct 13, 8:57 PM
Unknown Object (File)
Sat, Sep 27, 11:22 AM
Unknown Object (File)
Mon, Sep 22, 6:12 AM
Unknown Object (File)
Sep 18 2025, 4:51 PM
Unknown Object (File)
Sep 13 2025, 7:20 AM
Unknown Object (File)
Sep 10 2025, 7:43 PM
Unknown Object (File)
Aug 31 2025, 1:48 PM
Subscribers

Details

Summary

r341674 inadvertently introduced a bug where newer mirror components being
tasted would clear the high sc_flags that are not controlled by component
metadata, such as G_MIRROR_DEVICE_FLAG_TASTING. This could plausibly expose
a small window of time during STARTING where device destruction might race
with mirror component addition, probably resulting in a crash.

X-MFC-With: r341674

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/geom/mirror/g_mirror.c
3072 ↗(On Diff #51883)

While here, perhaps assert that the softc is xlocked at the beginning of this routine.

This revision is now accepted and ready to land.Dec 12 2018, 2:12 AM
cem marked an inline comment as done.Dec 12 2018, 2:19 AM
cem added inline comments.
sys/geom/mirror/g_mirror.c
3072 ↗(On Diff #51883)

Sure, that sounds like a good idea. Will do.

cem marked an inline comment as done.

Add softc xlock assertion

This revision now requires review to proceed.Dec 12 2018, 2:22 AM
This revision is now accepted and ready to land.Dec 12 2018, 2:25 AM
This revision was automatically updated to reflect the committed changes.