[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/4] xen/drivers/char/cadence-uart: fix IRQ registration failure propagation
- To: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Wed, 22 Apr 2026 13:26:24 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Mcud/qhJpljdbjPwtApNDzmwotYsEHs7Q7isGPtEHG0=; b=QgUta9F0bdOcu+w3XakpVjcfIfS4LXwBCruL1kzpMsePA9F69SZ2vCsPL3r3V21c2cJvMZOrzeCeYCkPugvAhp6ghANa9orbCVvFkHA606wcuT8jGEPVSW5Mjk2cBQKzZuT9byD7lXHtINfXmiQBlhGAeK4TJmVyoSazWknZ4wg2KzeoQF4dy12AOaZ9W2DFCUt/CmpZ+82FgSUfui1nZwQwYfqB8o1Fiz1V1IxNZAVJtZ0tvkQQU3DXq7FARDv0gE/Jw75xLPSNZ8WDjfP7H6CxcUnPKFSEDMOsp+Ib8pecJ/kGDjgWF0HrptInMSQzkawkDi565WJjZ0dDOlG8lA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x2ei8T955erKzQrVXpmNOhj4yFkUpr+ZjZQRCFTgJLKKXn6/x2CddfsKGe1AjQxsoPmr7x0tLfnKW0PCPABClE0SU0ibHi8Lx9sWwtnJxGdT14J7m1KMqomcxCb+DDAOnjCdZYQk/+E8KYcWCq5NeOWl3CzNiZ9LwR6ez70g8roRPx9F1LoNHCsbWJAPYgO2kfQL4Jo8/ubqcN2hPdNlRxfm2GgBwFhD8tpf5zJ5xRkZePDQzFv+tcIOHd/wO1dROSAtXhxhlKRrvT35+W3pmrp3lzNMmJNa/5tldPaziwmMijeONF81Cjg70tQRxjh7F7uQs1kDKJ+ekWP1pa1JFQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Wed, 22 Apr 2026 11:26:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22/04/2026 11:33, Oleksii Moisieiev wrote:
> In cuart_init_postirq(), two code paths could reach the
> interrupt-enable write to IER without a handler being registered:
>
> - When no valid IRQ number was provided (uart->irq <= 0), the original
> positive-condition guard (if uart->irq > 0) skipped the irqaction
> setup but still fell through to the IER write, enabling the receive
> data interrupt with no handler installed.
>
> - When setup_irq() returned an error, only an error message was
> printed and execution continued to the IER write, arming the
> receive hardware interrupt line with no handler to service it. On
> platforms where the GIC receives this asserted line, the result is
> either repeated spurious-interrupt warnings or an unhandled
> interrupt fault.
>
> Restructure cuart_init_postirq() to use early returns in both error
> paths.
>
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|