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)
Mon, Oct 21, 9:49 PM
Unknown Object (File)
Tue, Oct 8, 2:38 PM
Unknown Object (File)
Sep 18 2024, 11:33 PM
Unknown Object (File)
Sep 18 2024, 11:11 PM
Unknown Object (File)
Sep 17 2024, 3:43 PM
Unknown Object (File)
Sep 16 2024, 8:38 AM
Unknown Object (File)
Sep 6 2024, 1:50 PM
Unknown Object (File)
Sep 1 2024, 5:20 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 21509
Build 20822: arc lint + arc unit

Event Timeline

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

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
3074

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.