Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 12:33:12 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r341951 - stable/12/sys/dev/mlx5/mlx5_ib
Message-ID:  <201812121233.wBCCXC3W086583@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec 12 12:33:12 2018
New Revision: 341951
URL: https://svnweb.freebsd.org/changeset/base/341951

Log:
  MFC r341569:
  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.
  
  Sponsored by:   Mellanox Technologies

Modified:
  stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c
==============================================================================
--- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c	Wed Dec 12 12:32:14 2018	(r341950)
+++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c	Wed Dec 12 12:33:12 2018	(r341951)
@@ -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?201812121233.wBCCXC3W086583>