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

Re: [Xen-devel] Re: [PATCH 2/3] xenoprof fixes: active_domains races




On 15 May 2006, at 18:34, Markus Armbruster wrote:

The active_domains code has race conditions:

* oprofile_set_active() calls set_active() method without holding
  start_sem.  This is clearly wrong, as xenoprof_set_active() makes
  several hypercalls.  oprofile_start(), for instance, could run in
  the middle of xenoprof_set_active().

* adomain_write(), adomain_read() and xenoprof_set_active() access
  global active_domains[] and adomains without synchronization.  I
  went for a simple, obvious fix and created another mutex.  Instead,
  one could move the shared data into oprof.c and protect it with
  start_sem, but that's more invasive.

Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>

Apart from updating to use the new mutex operations, patches 2 and 3 of your submitted set should be applied to patches/linux-2.6.16.13/xenoprof-generic.patch (yes, they need to be a patch of patch: sorry about that!). However, feel free to submit one mega-patch that merges both patches into one patch-of-a-patch.

 -- Keir


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