From patchwork Wed Aug 31 21:22:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 5164 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 07EB827BBEA; Wed, 31 Aug 2022 22:24:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A68E127BBE9 for ; Wed, 31 Aug 2022 22:24:10 +0100 (BST) Received: from localhost ([::1]:37700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTVBx-0005m6-SF for patchwork@mira.cbaines.net; Wed, 31 Aug 2022 17:24:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTVBq-0005lp-Cu for guix-patches@gnu.org; Wed, 31 Aug 2022 17:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTVBq-0005mO-4D for guix-patches@gnu.org; Wed, 31 Aug 2022 17:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTVBp-0002nK-Vl for guix-patches@gnu.org; Wed, 31 Aug 2022 17:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57513] [PATCH] installer: Fix segfault on double logical partition removal. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Aug 2022 21:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57513@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166198103810730 (code B ref -1); Wed, 31 Aug 2022 21:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 Aug 2022 21:23:58 +0000 Received: from localhost ([127.0.0.1]:40670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTVBk-0002my-6Q for submit@debbugs.gnu.org; Wed, 31 Aug 2022 17:23:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:56738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTVBX-0002me-CI for submit@debbugs.gnu.org; Wed, 31 Aug 2022 17:23:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTVBX-0005kc-7V for guix-patches@gnu.org; Wed, 31 Aug 2022 17:23:43 -0400 Received: from jpoiret.xyz ([206.189.101.64]:45314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTVBV-0005kZ-BK for guix-patches@gnu.org; Wed, 31 Aug 2022 17:23:42 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id CD43718530A; Wed, 31 Aug 2022 21:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1661981016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1aCCzBGoANm9qVdDmA1iynVd7cPFl4EtihbMGkJ5RFA=; b=Yq9tg3endjWWEfbQm+/OPGdE2aKYSUQAu78cO2eOQDsZbh5h+zqrGLEORLHMUaxXWDJCoB I6++zJIUrxqaBFsQDjDZmZ38ygfI+bCUeAsS8LQef4rIonVGCOimg3QSfbC2Jk2NB9xgg7 FPovUW1ZfLbt/RCeUpkDP3Q675eDOI2g6lxKpnWd4s3hfojLUFE736NLK09V0PoSR9cgRN T1GUPbyxwUt3x9ch3Z7y7ZuMVnrSulA9BV++QzzdF2g2mdGqp6hIs6TaMxpRgkj2j06git irKwVuNrAqkmQBNZT0yP5FXz+mt43AjLwNZ1HAr+NI2FJKqm2M8Vzf+mZVIRnQ== Date: Wed, 31 Aug 2022 23:22:55 +0200 Message-Id: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: 19 X-Spam_score: 1.9 X-Spam_bar: + X-Spam_report: (1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.001, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.999, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret X-getmail-retrieved-from-mailbox: Patches * gnu/installer/parted.scm (auto-partition!): Avoid removing logical partitions twice. --- gnu/installer/parted.scm | 6 ++++++ 1 file changed, 6 insertions(+) base-commit: 47c11772dfe840a536ed7ec438fe832878f51054 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 ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2020 Tobias Geerinckx-Rice +;;; Copyright © 2022 Josselin Poiret ;;; ;;; 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)