All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Fatih Acar <fatih.acar@gandi.net>
Subject: Re: [PATCH 2/2] xl: disable events earlier for shutdown event
Date: Thu, 2 Feb 2017 16:05:08 +0000	[thread overview]
Message-ID: <22675.22708.295615.110064@mariner.uk.xensource.com> (raw)
In-Reply-To: <20170202160006.65iuief63vt2m6h3@citrix.com>

Wei Liu writes ("Re: [PATCH 2/2] xl: disable events earlier for shutdown event"):
> On Thu, Feb 02, 2017 at 03:52:41PM +0000, 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 NULL, num_disks == 0
> 2. some removable disks are added, and domain config updated
> 3. guest reboots, xl gets shutdown event
> 4. handle_domain_death gets the latest d_config, num_disks != 0 now
> 5. try to disable disk eject events with evdisable_disk_ejects -> BOOM
> 
> So basically 5 needs to happen before 4. Moving that snippet seems to do
> the trick, and then freeing diskws + setting it to NULL makes the
> reboot path automatically re-register diskws.

Surely the right answer is to make evdisable_disk_ejects tolerate
whatever it finds in diskws (including diskws==NULL).  It could be
idempotent too.

That way nothing depends on the exact ordering.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-02-02 16:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 15:46 [PATCH 0/2] xl: event machinery fixes Wei Liu
2017-02-02 15:46 ` [PATCH 1/2] xl: free event in DOMAIN_RESTART_RENAME error path Wei Liu
2017-02-02 16:22   ` Wei Liu
2017-02-03 11:57   ` Ian Jackson
2017-02-02 15:46 ` [PATCH 2/2] xl: disable events earlier for shutdown event Wei Liu
2017-02-02 15:52   ` Ian Jackson
2017-02-02 16:00     ` Wei Liu
2017-02-02 16:05       ` Ian Jackson [this message]
2017-02-02 16:22         ` Wei Liu
2017-02-02 16:24           ` Ian Jackson
2017-02-03  9:46           ` Fatih Acar
2017-02-03 11:08             ` Wei Liu
2017-02-03 12:06 ` [PATCH 0/2] xl: event machinery fixes Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22675.22708.295615.110064@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=fatih.acar@gandi.net \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.