Page MenuHomeFreeBSD

gmirror: Fix a bug introduced in r341674
ClosedPublic

Authored by cem on Dec 12 2018, 1:09 AM.
Tags
None
Referenced Files
F168620899: D18521.id51883.diff
Sat, Aug 29, 7:28 AM
Unknown Object (File)
Wed, Aug 26, 7:16 AM
Unknown Object (File)
Wed, Aug 26, 3:11 AM
Unknown Object (File)
Wed, Aug 26, 2:19 AM
Unknown Object (File)
Tue, Aug 25, 8:39 PM
Unknown Object (File)
Tue, Aug 25, 7:31 PM
Unknown Object (File)
Tue, Aug 25, 6:58 PM
Unknown Object (File)
Tue, Aug 25, 5: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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21505
Build 20818: arc lint + arc unit

Event Timeline

markj added inline comments.
sys/geom/mirror/g_mirror.c
3072

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

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.