Guanrui Huang
c26591afd3
irqchip/gic-v3-its: Prevent double free on error
...
The error handling path in its_vpe_irq_domain_alloc() causes a double free
when its_vpe_init() fails after successfully allocating at least one
interrupt. This happens because its_vpe_irq_domain_free() frees the
interrupts along with the area bitmap and the vprop_page and
its_vpe_irq_domain_alloc() subsequently frees the area bitmap and the
vprop_page again.
Fix this by unconditionally invoking its_vpe_irq_domain_free() which
handles all cases correctly and by removing the bitmap/vprop_page freeing
from its_vpe_irq_domain_alloc().
[ tglx: Massaged change log ]
Fixes: 7d75bbb4bc1a ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
Signed-off-by: Guanrui Huang <guanrui.huang@linux.alibaba.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240418061053.96803-2-guanrui.huang@linux.alibaba.com
2024-04-25 14:30:46 +02:00
..
2019-05-30 11:26:32 -07:00
2021-06-11 14:32:12 +01:00
2023-04-13 13:13:50 -07:00
2023-02-13 19:39:25 +00:00
2023-02-25 11:30:21 -08:00
2024-03-26 02:12:16 +01:00
2022-05-04 16:37:48 +01:00
2023-02-05 10:55:19 +00:00
2021-10-26 10:13:31 +01:00
2019-06-19 17:09:55 +02:00
2021-06-10 13:09:19 +01:00
2021-10-26 10:13:31 +01:00
2017-07-04 11:10:37 +01:00
2017-07-04 11:10:37 +01:00
2021-10-26 10:13:31 +01:00
2021-10-26 10:13:31 +01:00
2023-01-11 19:51:39 +01:00
2024-02-13 10:53:15 +01:00
2024-02-13 10:53:15 +01:00
2023-02-18 14:23:41 +00:00
2024-02-13 09:33:31 +01:00
2023-06-17 07:21:08 +01:00
2019-06-19 17:09:55 +02:00
2023-04-08 11:07:49 +01:00
2021-11-12 16:09:50 +00:00
2021-10-26 10:13:31 +01:00
2021-10-26 10:13:31 +01:00
2021-10-26 10:13:31 +01:00
2023-06-17 07:20:52 +01:00
2023-05-30 11:01:22 +01:00
2023-10-07 12:47:12 +01:00
2023-08-21 17:49:11 +01:00
2022-06-09 17:36:57 +01:00
2023-04-08 11:07:49 +01:00
2023-08-21 17:49:11 +01:00
2021-12-09 11:52:20 +01:00
2019-06-19 17:09:07 +02:00
2024-04-25 14:30:46 +02:00
2023-02-13 19:31:25 +00:00
2024-03-11 14:03:03 -07:00
2023-12-20 19:26:31 -05:00
2024-01-24 16:02:48 +01:00
2021-06-10 13:09:19 +01:00
2021-10-26 10:13:31 +01:00
2023-08-21 17:40:30 +01:00
2021-06-10 13:09:19 +01:00
2024-02-27 18:12:09 +01:00
2023-02-08 13:37:55 +01:00
2024-03-11 14:03:03 -07:00
2024-02-27 18:12:09 +01:00
2023-08-21 17:42:00 +01:00
2021-12-16 15:19:52 +00:00
2021-06-10 13:09:19 +01:00
2022-04-25 20:53:18 +02:00
2023-06-17 07:54:48 +01:00
2024-02-27 18:12:09 +01:00
2022-12-05 10:45:11 +00:00
2024-03-11 13:50:30 -07:00
2021-06-10 13:09:19 +01:00
2023-08-21 17:49:11 +01:00
2023-06-16 12:59:28 +01:00
2022-11-26 13:12:13 +00:00
2023-02-13 19:31:25 +00:00
2023-08-21 17:49:11 +01:00
2022-02-15 11:25:46 +00:00
2021-06-10 13:09:19 +01:00
2022-12-05 10:39:52 +00:00
2024-02-27 18:12:10 +01:00
2024-02-27 18:12:10 +01:00
2024-02-21 18:40:00 +01:00
2023-04-13 13:13:52 -07:00
2024-02-22 18:04:42 +01:00
2021-07-09 10:18:58 +01:00
2023-08-21 17:40:20 +01:00
2023-06-17 07:21:02 +01:00
2021-06-10 13:09:19 +01:00
2021-04-07 13:26:00 +01:00
2022-11-28 11:44:02 +00:00
2021-08-12 08:15:15 +01:00
2023-02-05 11:11:24 +00:00
2022-12-06 12:50:17 +01:00
2023-02-13 19:31:25 +00:00
2024-02-27 18:12:10 +01:00
2023-08-21 17:49:11 +01:00
2023-06-21 13:50:53 +01:00
2022-03-23 17:35:57 -07:00
2021-10-26 10:13:31 +01:00
2018-01-04 11:13:22 +00:00
2022-06-28 17:31:15 +09:00
2023-08-21 17:48:59 +01:00
2020-09-25 16:57:33 +01:00
2021-07-26 18:01:27 +01:00
2021-07-09 10:18:58 +01:00
2024-02-27 18:12:10 +01:00
2024-02-13 10:26:15 +01:00
2021-10-26 10:13:31 +01:00
2022-09-28 14:17:10 +01:00
2024-02-27 18:12:10 +01:00
2024-02-27 18:12:10 +01:00
2024-02-27 18:12:10 +01:00
2024-03-18 21:09:02 +01:00
2024-03-15 15:27:02 +01:00
2021-10-26 10:13:31 +01:00
2024-03-11 14:03:03 -07:00
2023-04-13 13:13:53 -07:00
2022-05-04 16:33:17 +01:00
2022-07-08 14:23:57 +02:00
2023-08-21 17:49:11 +01:00
2024-02-26 15:09:18 +01:00
2024-02-27 18:12:10 +01:00
2021-10-26 10:13:31 +01:00
2022-05-04 16:36:59 +01:00
2023-08-21 17:49:11 +01:00
2023-08-21 17:49:11 +01:00
2022-06-15 17:41:11 +02:00
2023-08-21 17:49:11 +01:00
2023-08-21 17:49:11 +01:00
2024-02-27 18:12:11 +01:00
2023-08-21 17:49:11 +01:00
2023-08-14 10:26:56 +02:00
2019-06-19 17:09:55 +02:00
2024-02-21 18:31:08 +01:00
2021-10-26 10:13:31 +01:00
2022-11-26 13:29:48 +00:00
2022-03-04 14:32:57 +00:00
2023-09-20 05:03:20 -07:00
2023-12-12 15:45:39 +01:00
2021-10-26 10:13:31 +01:00
2023-08-21 17:49:11 +01:00
2024-02-26 15:09:18 +01:00
2024-02-26 15:09:18 +01:00
2021-06-10 13:09:19 +01:00
2023-09-12 13:38:08 +01:00
2021-12-16 13:29:44 +00:00