Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2018 13:48:10 +0000 (UTC)
From:      Slava Shwartsman <slavash@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341569 - head/sys/dev/mlx5/mlx5_ib
Message-ID:  <201812051348.wB5DmABK082064@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: slavash
Date: Wed Dec  5 13:48:10 2018
New Revision: 341569
URL: https://svnweb.freebsd.org/changeset/base/341569

Log:
  mlx5ib: Fix null pointer dereference in mlx5_ib_create_srq
  
  Although "create_srq_user" does overwrite "in.pas" on some paths, it
  also contains at least one feasible path which does not overwrite it.
  
  Approved by:    hselasky (mentor)
  MFC after:      1 week
  Sponsored by:   Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c

Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c	Wed Dec  5 13:47:41 2018	(r341568)
+++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c	Wed Dec  5 13:48:10 2018	(r341569)
@@ -287,7 +287,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
 	else
 		err = create_srq_kernel(dev, srq, &in, buf_size);
 
-	if (err) {
+	if (err || !in.pas) {
 		mlx5_ib_warn(dev, "create srq %s failed, err %d\n",
 			     pd->uobject ? "user" : "kernel", err);
 		goto err_srq;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812051348.wB5DmABK082064>