all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#57513] [PATCH] installer: Fix segfault on double logical partition removal.
@ 2022-08-31 21:22 Josselin Poiret via Guix-patches via
  2022-09-01 16:48 ` bug#57513: " Mathieu Othacehe
  0 siblings, 1 reply; 4+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2022-08-31 21:22 UTC (permalink / raw)
  To: 57513; +Cc: Josselin Poiret

* gnu/installer/parted.scm (auto-partition!): Avoid removing logical
partitions twice.
---
 gnu/installer/parted.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 641a1f45e8..84fdbe24fb 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -983,6 +984,11 @@ (define* (auto-partition! disk
     (for-each
      (lambda (partition)
        (and (data-partition? partition)
+            ;; Do not remove logical partitions ourselves, since
+            ;; disk-remove-partition* will remove all the logical partitions
+            ;; residing on an extended partition, which would lead to a
+            ;; double-remove and ensuing SEGFAULT.
+            (not (logical-partition? partition))
             (disk-remove-partition* disk partition)))
      non-boot-partitions)
 

base-commit: 47c11772dfe840a536ed7ec438fe832878f51054
-- 
2.37.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-02  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 21:22 [bug#57513] [PATCH] installer: Fix segfault on double logical partition removal Josselin Poiret via Guix-patches via
2022-09-01 16:48 ` bug#57513: " Mathieu Othacehe
2022-09-01 19:16   ` [bug#57513] " Josselin Poiret via Guix-patches via
2022-09-02  7:50     ` Mathieu Othacehe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.