All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Ian Campbell <Ian.Campbell@citrix.com>, Keir Fraser <keir.xen@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Konrad <konrad.wilk@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Xen-devel] [PATCH 1/3] xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive
Date: Wed, 17 Aug 2011 14:51:27 +0200	[thread overview]
Message-ID: <20110817125127.GA3163@aepfle.de> (raw)
In-Reply-To: <1313504072.5010.120.camel@zakaz.uk.xensource.com>

On Tue, Aug 16, Ian Campbell wrote:

> On Tue, 2011-08-16 at 14:16 +0100, Olaf Hering wrote:
> > During repeated kexec boots xenwatch_thread() can crash because
> > xenbus_watch->callback is cleared by xenbus_watch_path() if a node/token
> > combo for a new watch happens to match an already registered watch from
> > an old kernel.  In this case xs_watch returns -EEXISTS, then
> > register_xenbus_watch() does not remove the to-be-registered watch from
> > the list of active watches but returns the -EEXISTS to the caller
> > anyway.
> 
> Isn't this behaviour the root cause of the issue (which should be fixed)
> rather than papering over it during watch processing. IOW should't
> register_xenbus_watch cleanup after itself if xs_watch fails.

Keir, the EEXISTS case in register_xenbus_watch() was added by you 6
years ago. Do you happen to know what it tried to solve, and do these
conditions still apply today?  Perhaps the EEXISTS can be removed now.

http://xenbits.xen.org/hg/xen-unstable.hg/diff/8016551fde98/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c

Olaf

  reply	other threads:[~2011-08-17 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16 13:16 [PATCH 0/3] [v5] kexec and kdump for Xen PVonHVM guests Olaf Hering
2011-08-16 13:16 ` [PATCH 1/3] xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive Olaf Hering
2011-08-16 14:14   ` [Xen-devel] " Ian Campbell
2011-08-17 12:51     ` Olaf Hering [this message]
2011-08-17 13:30       ` Keir Fraser
2011-08-17 13:30         ` Keir Fraser
2011-08-16 13:16 ` [PATCH 2/3] xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports Olaf Hering
2011-08-16 13:16 ` [PATCH 3/3] xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel Olaf Hering

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=20110817125127.GA3163@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=keir.xen@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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.