mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Guanrui Huang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Guanrui Huang <guanrui.huang@linux.alibaba.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Zenghui Yu <yuzenghui@huawei.com>, Marc Zyngier <maz@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/core] irqchip/gic-v3-its: Remove BUG_ON in its_vpe_irq_domain_alloc
Date: Thu, 25 Apr 2024 12:46:48 -0000	[thread overview]
Message-ID: <171404920851.10875.11267717296229772633.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240418061053.96803-3-guanrui.huang@linux.alibaba.com>

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     382d2ffe86efb1e2fa803d2cf17e5bfc34e574f3
Gitweb:        https://git.kernel.org/tip/382d2ffe86efb1e2fa803d2cf17e5bfc34e574f3
Author:        Guanrui Huang <guanrui.huang@linux.alibaba.com>
AuthorDate:    Thu, 18 Apr 2024 14:10:53 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 25 Apr 2024 14:38:24 +02:00

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

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: Guanrui Huang <guanrui.huang@linux.alibaba.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240418061053.96803-3-guanrui.huang@linux.alibaba.com

---
 drivers/irqchip/irq-gic-v3-its.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 20f9542..98e5593 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -4526,8 +4526,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;

  parent reply	other threads:[~2024-04-25 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  6:10 [PATCH v5 0/2] irqchip/gic-v3-its: Fix double free on error Guanrui Huang
2024-04-18  6:10 ` [PATCH v5 1/2] " Guanrui Huang
2024-04-18  7:55   ` Markus Elfring
2024-04-25 12:46   ` [tip: irq/urgent] irqchip/gic-v3-its: Prevent " tip-bot2 for Guanrui Huang
2024-04-18  6:10 ` [PATCH v5 2/2] irqchip/gic-v3-its: remove BUG_ON in its_vpe_irq_domain_alloc Guanrui Huang
2024-04-18  6:56   ` Zenghui Yu
2024-04-25 12:46   ` tip-bot2 for Guanrui Huang [this message]
2024-04-18  7:18 ` [PATCH v5 0/2] irqchip/gic-v3-its: Fix double free on error Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171404920851.10875.11267717296229772633.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=guanrui.huang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®