[ofw] [Patch 42/62] Reference implementation of NDv2
Fab Tillier
ftillier at microsoft.com
Wed Feb 20 18:30:55 PST 2013
Fix error flow when QP creation fails.
Got a NULL dereference in mlx4_clear_qp, which needs to check that the table is non-NULL.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -dwup3 -X excl.txt -r \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\qp.c .\hw\mlx4\user\hca\qp.c
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\user\hca\qp.c Tue Aug 07 17:06:08 2012
+++ .\hw\mlx4\user\hca\qp.c Fri Aug 10 15:22:02 2012
@@ -755,6 +755,10 @@ void mlx4_clear_qp(struct mlx4_context *
{
int tind = (qpn & (ctx->num_qps - 1)) >> ctx->qp_table_shift;
+ if (ctx->qp_table[tind].table == NULL) {
+ return;
+ }
+
pthread_mutex_lock(&ctx->qp_table_mutex);
if (!--ctx->qp_table[tind].refcnt)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.42.patch
Type: application/octet-stream
Size: 565 bytes
Desc: ndv2.42.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/4153a839/attachment.obj>
More information about the ofw
mailing list