[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 07/18] mini-os: avoid crash if no console is provided



On Thu, 2012-01-12 at 23:35 +0000, Daniel De Graaf wrote:
> Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
> ---
>  extras/mini-os/console/xencons_ring.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/extras/mini-os/console/xencons_ring.c 
> b/extras/mini-os/console/xencons_ring.c
> index 22fd618..14a8bd1 100644
> --- a/extras/mini-os/console/xencons_ring.c
> +++ b/extras/mini-os/console/xencons_ring.c
> @@ -25,7 +25,10 @@ static inline void notify_daemon(struct consfront_dev *dev)
>  
>  static inline struct xencons_interface *xencons_interface(void)
>  {
> -    return mfn_to_virt(start_info.console.domU.mfn);
> +    if (start_info.console.domU.evtchn)
> +        return mfn_to_virt(start_info.console.domU.mfn);
> +    else
> +        return NULL;
>  } 
>   
>  int xencons_ring_send_no_notify(struct consfront_dev *dev, const char *data, 
> unsigned len)
> @@ -38,6 +41,8 @@ int xencons_ring_send_no_notify(struct consfront_dev *dev, 
> const char *data, uns
>              intf = xencons_interface();
>          else
>              intf = dev->ring;
> +    if (!intf)
> +        return sent;

Indentation. Otherwise

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Although I would still prefer if we could figure out some scheme to get
logs out of this domain...

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.