Commit 1b137b21 authored by Guanrui Huang's avatar Guanrui Huang Committed by Yuntao Liu
Browse files

irqchip/gic-v3-its: Remove BUG_ON in its_vpe_irq_domain_alloc

stable inclusion
from stable-v4.19.321
commit 139510ec274c7cc8739bb8f63aed70e425c2f0d8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IATEDW

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=139510ec274c7cc8739bb8f63aed70e425c2f0d8



--------------------------------

[ Upstream commit 382d2ffe86efb1e2fa803d2cf17e5bfc34e574f3 ]

This BUG_ON() is useless, because the same effect will be obtained
by letting the code run its course and vm being dereferenced,
triggering an exception.

So just remove this check.

Signed-off-by: default avatarGuanrui Huang <guanrui.huang@linux.alibaba.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarZenghui Yu <yuzenghui@huawei.com>
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240418061053.96803-3-guanrui.huang@linux.alibaba.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
parent 71f9029f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3477,8 +3477,6 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
	struct page *vprop_page;
	int base, nr_ids, i, err = 0;

	BUG_ON(!vm);

	bitmap = its_lpi_alloc(roundup_pow_of_two(nr_irqs), &base, &nr_ids);
	if (!bitmap)
		return -ENOMEM;