mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Fourier <fourier.thomas@gmail.com>
Cc: Thomas Fourier <fourier.thomas@gmail.com>,
	Koby Elbaz <koby.elbaz@intel.com>,
	Konstantin Sinyuk <konstantin.sinyuk@intel.com>,
	Oded Gabbay <ogabbay@kernel.org>,
	dri-devel@lists.freedesktop.org (open list:HABANALABS PCI DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] accel/habanalabs/gaudi2: free the event queue IRQ with the right dev_id
Date: Thu, 26 Nov 2026 15:10:53 +0100	[thread overview]
Message-ID: <20261126141100.44391-2-fourier.thomas@gmail.com> (raw)

gaudi2_enable_msix() requests the event queue vector with
&hdev->event_queue as dev_id, but its error path frees it with the
completion queue pointer. free_irq() does not find the action, so the
event queue IRQ stays registered while pci_free_irq_vectors() tears the
vectors down.

Use the same dev_id as the request.

Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Fixes: c833ac1a5f34 ("habanalabs/gaudi2: free event irq if init fails")
---
 drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index 5d9c6f0698b7..b082d7eb6c45 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -4761,7 +4761,7 @@ static int gaudi2_enable_msix(struct hl_device *hdev)
 	gaudi2_dec_disable_msix(hdev, GAUDI2_IRQ_NUM_DEC_LAST + 1);
 free_event_irq:
 	irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_EVENT_QUEUE);
-	free_irq(irq, cq);
+	free_irq(irq, &hdev->event_queue);
 
 free_completion_irq:
 	irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_COMPLETION);
-- 
2.53.0


                 reply	other threads:[~2026-11-26 14:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261126141100.44391-2-fourier.thomas@gmail.com \
    --to=fourier.thomas@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=koby.elbaz@intel.com \
    --cc=konstantin.sinyuk@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    /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®