svn commit: r323026 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Wed Aug 30 18:46:40 UTC 2017


Author: np
Date: Wed Aug 30 18:46:38 2017
New Revision: 323026
URL: https://svnweb.freebsd.org/changeset/base/323026

Log:
  cxgbe(4): Zero out the memory allocated for the debug dump.
  cudbg_collect seems to expect it this way.
  
  MFC after:	1 week
  Sponsored by:	Chelsio Communications

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

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Wed Aug 30 18:22:52 2017	(r323025)
+++ head/sys/dev/cxgbe/t4_main.c	Wed Aug 30 18:46:38 2017	(r323026)
@@ -9191,7 +9191,7 @@ cudbg_dump(struct adapter *sc, struct t4_cudbg_dump *d
 	void *handle, *buf;
 
 	/* buf is large, don't block if no memory is available */
-	buf = malloc(dump->len, M_CXGBE, M_NOWAIT);
+	buf = malloc(dump->len, M_CXGBE, M_NOWAIT | M_ZERO);
 	if (buf == NULL)
 		return (ENOMEM);
 


More information about the svn-src-all mailing list