Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 22:42:53 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341001 - head/sys/dev/cxgbe/cxgbei
Message-ID:  <201811262242.wAQMgrrx078779@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Nov 26 22:42:52 2018
New Revision: 341001
URL: https://svnweb.freebsd.org/changeset/base/341001

Log:
  Check for an allocation failure before dereferencing the pointer.
  
  Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
  Reviewed by:	np
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18310

Modified:
  head/sys/dev/cxgbe/cxgbei/cxgbei.c

Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c
==============================================================================
--- head/sys/dev/cxgbe/cxgbei/cxgbei.c	Mon Nov 26 22:21:40 2018	(r341000)
+++ head/sys/dev/cxgbe/cxgbei/cxgbei.c	Mon Nov 26 22:42:52 2018	(r341001)
@@ -449,9 +449,9 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_he
 			struct icl_pdu *ip0;
 
 			ip0 = icl_cxgbei_new_pdu(M_NOWAIT);
-			icl_cxgbei_new_pdu_set_conn(ip0, ic);
 			if (ip0 == NULL)
 				CXGBE_UNIMPLEMENTED("PDU allocation failure");
+			icl_cxgbei_new_pdu_set_conn(ip0, ic);
 			icp0 = ip_to_icp(ip0);
 			icp0->icp_seq = 0; /* XXX */
 			icp0->icp_flags = ICPF_RX_HDR | ICPF_RX_STATUS;



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