Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-03 Thread Wei Liu
On Fri, Feb 03, 2017 at 10:46:14AM +0100, Fatih Acar wrote: > On 02/02/2017 17:22, Wei Liu wrote: > > > > The other solution is to have a dedicated counter for diskws instead of > > relying on num_disks. > > > > It's all good, both patches fix the issue, thank you. > Cool, I will add a

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-03 Thread Fatih Acar
On 02/02/2017 17:22, Wei Liu wrote: > > The other solution is to have a dedicated counter for diskws instead of > relying on num_disks. > It's all good, both patches fix the issue, thank you. -- Fatih ACAR Gandi fatih.a...@gandi.net ___ Xen-devel

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 2/2] xl: disable events earlier for shutdown event"): > No, handling NULL is not enough. It could well be possible that diskws > is not NULL but then num_disks grows, thus making evdisable_disk_ejects > access out of bound. The additional diskws entries could be

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Wei Liu
On Thu, Feb 02, 2017 at 04:05:08PM +, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH 2/2] xl: disable events earlier for shutdown > event"): > > On Thu, Feb 02, 2017 at 03:52:41PM +, Ian Jackson wrote: > > > But I think I don't really understand what the original bug is. > > > > The

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 2/2] xl: disable events earlier for shutdown event"): > On Thu, Feb 02, 2017 at 03:52:41PM +, Ian Jackson wrote: > > But I think I don't really understand what the original bug is. > > The original bug is that: Ah. > 1. boot a guest with no disks, so diskws is

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Wei Liu
On Thu, Feb 02, 2017 at 03:52:41PM +, Ian Jackson wrote: > Wei Liu writes ("[PATCH 2/2] xl: disable events earlier for shutdown event"): > > We need to disable event machinery when the guest shuts down. It > > doesn't really matter where we disable it as long as it is within the > > branch

Re: [Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Ian Jackson
Wei Liu writes ("[PATCH 2/2] xl: disable events earlier for shutdown event"): > We need to disable event machinery when the guest shuts down. It > doesn't really matter where we disable it as long as it is within the > branch for shutdown event. I don't think this is necessary. My intent was

[Xen-devel] [PATCH 2/2] xl: disable events earlier for shutdown event

2017-02-02 Thread Wei Liu
We need to disable event machinery when the guest shuts down. It doesn't really matter where we disable it as long as it is within the branch for shutdown event. Move the code snippet before handle_domain_death, so that d_config is not yet updated and we have the correct ->num_disks. And the