socsvn commit: r286780 - in soc2013/def/crashdump-head/sys: kern sys

def at FreeBSD.org def at FreeBSD.org
Sun Jun 7 13:18:15 UTC 2015


Author: def
Date: Sun Jun  7 13:18:13 2015
New Revision: 286780
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=286780

Log:
  Return proper size when kernel dump key is NULL.

Modified:
  soc2013/def/crashdump-head/sys/kern/kern_shutdown.c
  soc2013/def/crashdump-head/sys/sys/kerneldump.h

Modified: soc2013/def/crashdump-head/sys/kern/kern_shutdown.c
==============================================================================
--- soc2013/def/crashdump-head/sys/kern/kern_shutdown.c	Sun Jun  7 13:15:29 2015	(r286779)
+++ soc2013/def/crashdump-head/sys/kern/kern_shutdown.c	Sun Jun  7 13:18:13 2015	(r286780)
@@ -71,6 +71,8 @@
 #include <sys/vnode.h>
 #include <sys/watchdog.h>
 
+#include <crypto/rijndael/rijndael-api-fst.h>
+
 #include <ddb/ddb.h>
 
 #include <machine/cpu.h>

Modified: soc2013/def/crashdump-head/sys/sys/kerneldump.h
==============================================================================
--- soc2013/def/crashdump-head/sys/sys/kerneldump.h	Sun Jun  7 13:15:29 2015	(r286779)
+++ soc2013/def/crashdump-head/sys/sys/kerneldump.h	Sun Jun  7 13:18:13 2015	(r286780)
@@ -38,11 +38,9 @@
 #ifndef _SYS_KERNELDUMP_H
 #define _SYS_KERNELDUMP_H
 
-#include <machine/endian.h>
+#include <sys/param.h>
 
-#ifdef _KERNEL
-#include <crypto/rijndael/rijndael-api-fst.h>
-#endif
+#include <machine/endian.h>
 
 #if BYTE_ORDER == LITTLE_ENDIAN
 #define	dtoh32(x)	__bswap32(x)
@@ -105,6 +103,8 @@
 kerneldumpkey_size(struct kerneldumpkey *kdk)
 {
 
+	if (kdk == NULL)
+		return (0);
 	return (kdk->kdk_size);
 }
 


More information about the svn-soc-all mailing list