From owner-svn-soc-all@FreeBSD.ORG Sun Jun 7 13:18:15 2015 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EAE2328 for ; Sun, 7 Jun 2015 13:18:15 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D5DE165A for ; Sun, 7 Jun 2015 13:18:15 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57DIEcE027355 for ; Sun, 7 Jun 2015 13:18:14 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t57DIExd027338 for svn-soc-all@FreeBSD.org; Sun, 7 Jun 2015 13:18:14 GMT (envelope-from def@FreeBSD.org) Date: Sun, 7 Jun 2015 13:18:14 GMT Message-Id: <201506071318.t57DIExd027338@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to def@FreeBSD.org using -f From: def@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r286780 - in soc2013/def/crashdump-head/sys: kern sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 13:18:15 -0000 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 #include +#include + #include #include 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 +#include -#ifdef _KERNEL -#include -#endif +#include #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); }