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)
Tue, Nov 26, 8:52 PM
Unknown Object (File)
Nov 23 2024, 12:36 AM
Unknown Object (File)
Nov 21 2024, 6:48 AM
Unknown Object (File)
Nov 19 2024, 10:20 PM
Unknown Object (File)
Oct 21 2024, 9:49 PM
Unknown Object (File)
Oct 8 2024, 2:38 PM
Unknown Object (File)
Sep 18 2024, 11:33 PM
Unknown Object (File)
Sep 18 2024, 11:11 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.