From nobody Mon Feb 9 20:30:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1697818577; cv=none; d=zohomail.com; s=zohoarc; b=efeo9kp1hrxDCj5vALDnabb6O6IVxiGiROnMNhgYU6T9kWhZghwBgbO6G3MV2aW7m59uOLWA+mG8mwFtau4toiUQ5oReAVzHcn23lDw2BqhK1zj8fNBa7fEBpzl0Vl//jey7HlnBHKR/KUS/I0OpmCCdbhko1/W7xqZLzbkrIKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697818577; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=I4hMGAn3CCXbvIhFniLsRuw1X84vM7LzNgk6oVf6hDo=; b=DbgAZbsIzOEzjYuhEbYhfmSLDS7xnL8MDRIpja4CZFyvnnvfEh3VkQToJXGEySEtBlyOc5oLRroplsjKhkiumednzTEsUN07je9WYfq3Wvr06arr9kMPsLB2GKQrbL7xTYE2ANiPFw3CpWS27Nz5Z4pccmyak6NiGS05+KSXsIQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1697818576991984.3041517411027; Fri, 20 Oct 2023 09:16:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.619873.965660 (Exim 4.92) (envelope-from ) id 1qtsA4-0004T0-2D; Fri, 20 Oct 2023 16:15:44 +0000 Received: by outflank-mailman (output) from mailman id 619873.965660; Fri, 20 Oct 2023 16:15:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qtsA3-0004Sr-Vg; Fri, 20 Oct 2023 16:15:43 +0000 Received: by outflank-mailman (input) for mailman id 619873; Fri, 20 Oct 2023 16:15:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qtsA2-0004Dr-Oo for xen-devel@lists.xenproject.org; Fri, 20 Oct 2023 16:15:42 +0000 Received: from casper.infradead.org (casper.infradead.org [2001:8b0:10b:1236::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e71fc3c1-6f63-11ee-9b0e-b553b5be7939; Fri, 20 Oct 2023 18:15:36 +0200 (CEST) Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qts9u-00E44C-84; Fri, 20 Oct 2023 16:15:34 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qts9s-001UOZ-13; Fri, 20 Oct 2023 17:15:32 +0100 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list X-Inumbo-ID: e71fc3c1-6f63-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=I4hMGAn3CCXbvIhFniLsRuw1X84vM7LzNgk6oVf6hDo=; b=g6XL6KrLFvXCVI21u1A5KeupFv +QFnHNBtXPSX2WGx/qzbR8hAv15UjjS3G7GeUcRbT6Gzod96JethLXROgfY3uc2SU169IvhiZdRGh PQGKjDFv0/nWu/OIs7h5I+YdQjcKmWPq6iD07vRG6QQQEc9KMRwcxd9MEFfDm+JhqgzS/494qQBHg cmRRbbr+caoCft14R2moMfBDrzAlzzoBVVkfYfN3hN7MnKJVzuTCxV7GKaf92411iUcMwW41EdBZu LzyJ/6kNrv4xSgCoDDiOqDloTvQ2En//Zuw6p8kbzieBn/ZS50xuBKNEiKD53bPkfqRtyRa8Wwy2S MoYvVmXQ==; From: David Woodhouse To: Juergen Gross , xen-devel@lists.xenproject.org Cc: Greg Kroah-Hartman , Jiri Slaby , Roger Pau Monne , Stefano Stabellini , Dawei Li , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Paul Durrant Subject: [PATCH v2 2/3] hvc/xen: fix error path in xen_hvc_init() to always register frontend driver Date: Fri, 20 Oct 2023 17:15:28 +0100 Message-Id: <20231020161529.355083-3-dwmw2@infradead.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231020161529.355083-1-dwmw2@infradead.org> References: <20231020161529.355083-1-dwmw2@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1697818579048100001 From: David Woodhouse The xen_hvc_init() function should always register the frontend driver, even when there's no primary console =E2=80=94 as there may be secondary co= nsoles. (Qemu can always add secondary consoles, but only the toolstack can add the primary because it's special.) Signed-off-by: David Woodhouse Reviewed-by: Juergen Gross Cc: stable@vger.kernel.org --- drivers/tty/hvc/hvc_xen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index f24e285b6441..4a768b504263 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -588,7 +588,7 @@ static int __init xen_hvc_init(void) ops =3D &dom0_hvc_ops; r =3D xen_initial_domain_console_init(); if (r < 0) - return r; + goto register_fe; info =3D vtermno_to_xencons(HVC_COOKIE); } else { ops =3D &domU_hvc_ops; @@ -597,7 +597,7 @@ static int __init xen_hvc_init(void) else r =3D xen_pv_console_init(); if (r < 0) - return r; + goto register_fe; =20 info =3D vtermno_to_xencons(HVC_COOKIE); info->irq =3D bind_evtchn_to_irq_lateeoi(info->evtchn); @@ -622,6 +622,7 @@ static int __init xen_hvc_init(void) } =20 r =3D 0; + register_fe: #ifdef CONFIG_HVC_XEN_FRONTEND r =3D xenbus_register_frontend(&xencons_driver); #endif --=20 2.40.1