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 <[email protected]> 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)
ndv2.42.patch
Description: ndv2.42.patch
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
