From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [Patch v2 2/2] xen: Identify panic and reboot/halt functions as noreturn Date: Mon, 25 Nov 2013 15:36:57 +0000 Message-ID: <52936E99.8010102@citrix.com> References: <1385388177-8866-1-git-send-email-andrew.cooper3@citrix.com> <1385388177-8866-3-git-send-email-andrew.cooper3@citrix.com> <52936C100200007800106B41@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VkyQe-0006Ak-7c for xen-devel@lists.xenproject.org; Mon, 25 Nov 2013 15:50:28 +0000 In-Reply-To: <52936C100200007800106B41@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser , Stefano Stabellini , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 25/11/13 14:26, Jan Beulich wrote: >>>> On 25.11.13 at 15:02, Andrew Cooper wrote: >> --- a/xen/include/xen/shutdown.h >> +++ b/xen/include/xen/shutdown.h >> @@ -1,13 +1,15 @@ >> #ifndef __XEN_SHUTDOWN_H__ >> #define __XEN_SHUTDOWN_H__ >> >> +#include >> + >> /* opt_noreboot: If true, machine will need manual reset on error. */ >> extern bool_t opt_noreboot; >> >> -void dom0_shutdown(u8 reason); >> +void dom0_shutdown(u8 reason) noreturn; >> >> -void machine_restart(unsigned int delay_millisecs); >> -void machine_halt(void); >> -void machine_power_off(void); >> +void machine_restart(unsigned int delay_millisecs) noreturn; >> +void machine_halt(void) noreturn; >> +void machine_power_off(void) noreturn; > I would have expected that you actually checked that all of these > functions really have no way of returning (even if just because of > an error or mistake). But you can't possibly have done this > verification, or else you would have noticed that there's no > function machine_power_off() in the code base (and I would have > expected your patch to remove the stray declaration instead of > adjusting it). > > Jan > I thought I had found it in an arm codepath, but git grep indicates I am wrong. I did positively identify each possible codepath from panic down to each tail function. It should certainly be removed. ~Andrew