* Patch "IB/mlx5: Fix NULL pointer dereference on debug print" has been added to the 4.8-stable tree
@ 2016-11-21 16:29 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-11-21 16:29 UTC (permalink / raw)
To: eli, dledford, gregkh, leon, maorg, yishaih; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
IB/mlx5: Fix NULL pointer dereference on debug print
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-mlx5-fix-null-pointer-dereference-on-debug-print.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From a1ab8402d15d2305d2315d96ec3294bfdf16587e Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli@mellanox.com>
Date: Thu, 27 Oct 2016 16:36:46 +0300
Subject: IB/mlx5: Fix NULL pointer dereference on debug print
From: Eli Cohen <eli@mellanox.com>
commit a1ab8402d15d2305d2315d96ec3294bfdf16587e upstream.
For XRC QP CQs may not exist. Check before attempting dereference.
Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/hw/mlx5/qp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2037,8 +2037,8 @@ struct ib_qp *mlx5_ib_create_qp(struct i
mlx5_ib_dbg(dev, "ib qpnum 0x%x, mlx qpn 0x%x, rcqn 0x%x, scqn 0x%x\n",
qp->ibqp.qp_num, qp->trans_qp.base.mqp.qpn,
- to_mcq(init_attr->recv_cq)->mcq.cqn,
- to_mcq(init_attr->send_cq)->mcq.cqn);
+ init_attr->recv_cq ? to_mcq(init_attr->recv_cq)->mcq.cqn : -1,
+ init_attr->send_cq ? to_mcq(init_attr->send_cq)->mcq.cqn : -1);
qp->trans_qp.xrcdn = xrcdn;
Patches currently in stable-queue which might be from eli@mellanox.com are
queue-4.8/ib-mlx5-fix-fatal-error-dispatching.patch
queue-4.8/ib-mlx5-fix-null-pointer-dereference-on-debug-print.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-21 16:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 16:29 Patch "IB/mlx5: Fix NULL pointer dereference on debug print" has been added to the 4.8-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.