All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xensource.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 2 of 3] linux-2.6.18: xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive
Date: Thu, 6 Oct 2011 11:23:44 +0200	[thread overview]
Message-ID: <20111006092343.GA3731@aepfle.de> (raw)
In-Reply-To: <4E8D88CE0200007800059A1A@nat28.tlf.novell.com>

On Thu, Oct 06, Jan Beulich wrote:

> While I committed the other two patches in this series, this one seems
> to have the potential for regressions (the comment and the checking for
> -EEXIST can be assumed to have been there for a reason - whether
> they became stale by now is not obvious), so I'd like to double check
> that you verified that there's no code path where
> register_xenbus_watch() could be called twice for the same watch.

Would there be any benefit from allowing such a second watch where path
and token match? In the end only one watcher will receive the event.
With this change such code bug will be found.

> The other possibly problematic case is that of watches user mode
> can register through writing the xenbus device: Here the patch
> definitely changes behavior observable by user mode (a
> re-registration does not cancel an existing watch without this
> change).

I did not know watches can be registered by domU userspace, and I
therfore did not consider this case.
Looking through xenbus_dev_write I think the patch does not change
behaviour because the requested watch-path may be the same, but the
generated token passed to xenstored will change each time a watch is
requested because the watch struct is allocated with kmalloc.

Olaf

  parent reply	other threads:[~2011-10-06  9:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 14:10 [PATCH 0 of 3] linux-2.6.18: merge fixes from mainline Olaf Hering
2011-10-05 14:10 ` [PATCH 1 of 3] linux-2.6.18: xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel Olaf Hering
2011-10-05 14:10 ` [PATCH 2 of 3] linux-2.6.18: xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive Olaf Hering
2011-10-06  8:54   ` Jan Beulich
2011-10-06  9:01     ` Ian Campbell
2011-10-06  9:17       ` Jan Beulich
2011-10-06  9:23     ` Olaf Hering [this message]
2011-10-05 14:10 ` [PATCH 3 of 3] linux-2.6.18: 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=20111006092343.GA3731@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=JBeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --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.