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

Re: [Xen-devel] [PATCH 2 of 3] linux-2.6.18: xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive



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

_______________________________________________
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®.