Page MenuHomeFreeBSD

gmirror: Fix a bug introduced in r341674
ClosedPublic

Authored by cem on Dec 12 2018, 1:09 AM.
Tags
None
Referenced Files
F93027842: D18521.id51883.diff
Fri, Sep 6, 1:50 PM
Unknown Object (File)
Sun, Sep 1, 5:20 PM
Unknown Object (File)
Sun, Sep 1, 6:08 AM
Unknown Object (File)
Fri, Aug 23, 8:49 PM
Unknown Object (File)
Mon, Aug 12, 10:36 PM
Unknown Object (File)
Jul 30 2024, 9:33 PM
Unknown Object (File)
Jul 2 2024, 8:23 PM
Unknown Object (File)
Jul 2 2024, 12:59 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.