Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2026 20:53:38 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Ariel Ehrenberg <aehrenberg@nvidia.com>
Subject:   git: 012c852efd27 - stable/15 - mlx5: guard against a NULL CQ event handler in mlx5_cq_event()
Message-ID:  <6a5e8ad2.1e406.52de805a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=012c852efd27a55dd1cd479b06efd7fb65945c56

commit 012c852efd27a55dd1cd479b06efd7fb65945c56
Author:     Ariel Ehrenberg <aehrenberg@nvidia.com>
AuthorDate: 2026-06-15 08:16:17 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-07-20 20:26:09 +0000

    mlx5: guard against a NULL CQ event handler in mlx5_cq_event()
    
    (cherry picked from commit 284e06dec78ffbbf8919dc0aa11073ecabba7176)
---
 sys/dev/mlx5/mlx5_core/mlx5_cq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/mlx5/mlx5_core/mlx5_cq.c b/sys/dev/mlx5/mlx5_core/mlx5_cq.c
index fa28ae6dece9..f1f8fc03de6c 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_cq.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_cq.c
@@ -113,7 +113,8 @@ void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type)
 		spin_unlock(&table->writerlock);
 
 	if (likely(cq != NULL)) {
-		cq->event(cq, event_type);
+		if (cq->event)
+			cq->event(cq, event_type);
 	} else {
 		mlx5_core_warn(dev,
 		    "Asynchronous event for bogus CQ 0x%x\n", cqn);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a5e8ad2.1e406.52de805a>