bug-coreutils
[Top][All Lists]
Advanced

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

bug#25680: [PATCH] copy: Avoid race when creating hard link over recentl


From: Mike Crowe
Subject: bug#25680: [PATCH] copy: Avoid race when creating hard link over recently-created file
Date: Mon, 13 Feb 2017 12:28:19 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Saturday 11 February 2017 at 23:20:24 -0800, Paul Eggert wrote:
> Mike Crowe wrote:
> >Do you think that if I added such a limit and diagnostic then the patch
> >would be acceptable?
> 
> I'd rather fix the underlying problem more systematically. How about the
> attached patch instead? I've installed this on Savannah so you can give it a
> whirl easily. It fixes the problem for me so I'm boldly marking this bug
> report as done; we can unmark it later if it turns out that I'm wrong.

My recipe for reproducing problem on demand relied on inserting sleeps in
the code. After your fix, the potential race now occurs inside the renameat
system call so there's nowhere appropriate to place such sleeps. I think
this means that your fix is clearly much better.

Thanks!

Mike.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]