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

Re: [Xen-devel] [PATCH v4 2/4] tools: split out xenstored starting form xencommons



On 02/08/16 13:13, Wei Liu wrote:
> On Tue, Aug 02, 2016 at 12:39:26PM +0200, Juergen Gross wrote:
>> In order to prepare starting a xenstore domain split out the starting
>> of the xenstore daemon from the xencommons script into a dedicated
>> launch-xenstore script.
>>
>> Correct one error: don't remove old tdb files in background, as this
>> could lead to very subtle races.
>>
> 
> Sorry to only notice this now -- I suppose this shouldn't be in commit
> message because it is a changelog for different revision of your patch,
> or you need to describe what the race is if there is really such issue
> -- and that's a potential backport candidate.

-               rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
...
+       rm -f "$XENSTORED_ROOTDIR"/tdb* 2>/dev/null

Please note the "&" in the removed line. And the description just tells
you that: the file shouldn't be removed in the background. How else
would you describe it?

And the race should be obvious: removing a file in the background which
is going to be used by the next command is racy.

> As far as I can tell this is pure code motion and shouldn't have any
> change in behaviour. Hence this line in commit message makes me feel a
> bit confused.

Still confused?


Juergen

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.