Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2024 13:52:17 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 692106afb8a8 - stable/14 - graid3: Fix teardown in g_raid3_try_destroy()
Message-ID:  <202404231352.43NDqHAe082039@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=692106afb8a8d6ff82d8d780a1ebdd9ffd74fd11

commit 692106afb8a8d6ff82d8d780a1ebdd9ffd74fd11
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-04-20 16:02:06 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-04-23 13:51:33 +0000

    graid3: Fix teardown in g_raid3_try_destroy()
    
    Commit 33cb9b3c3a22 replaced a g_raid3_destroy_device() call with a
    g_raid3_free_device() call, which was incorrect and could lead to a
    panic if a RAID3 GEOM failed to start (e.g., due to missing disks).
    
    Reported by:    graid3 tests
    Fixes:          33cb9b3c3a22 ("graid3: Fix teardown races")
    MFC after:      3 days
    Sponsored by:   Klara, Inc.
    
    (cherry picked from commit 955f213fa2f14d5b5e9b655d8922e28315eb9fa3)
---
 sys/geom/raid3/g_raid3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c
index 721610cefbec..c2d05b48d80d 100644
--- a/sys/geom/raid3/g_raid3.c
+++ b/sys/geom/raid3/g_raid3.c
@@ -2033,7 +2033,7 @@ g_raid3_try_destroy(struct g_raid3_softc *sc)
 		sc->sc_worker = NULL;
 	} else {
 		g_topology_unlock();
-		g_raid3_free_device(sc);
+		g_raid3_destroy_device(sc);
 	}
 	return (1);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404231352.43NDqHAe082039>