[ovs-dev] Bug#681880: [debian 1/9] lockfile: Fix hang locking through a dangling symlink.
Simon Horman
horms at verge.net.au
Tue Jul 31 02:40:59 UTC 2012
On Mon, Jul 30, 2012 at 03:18:16PM -0700, Ben Pfaff wrote:
> open() with O_CREAT|O_EXCL yields EEXIST if the file being opened is a
> symlink. lockfile_try_lock() interpreted that error code to mean that
> some other process had created the lock file in the meantime, so it went
> around its loop again, which found out the same thing, which led to a hang.
>
> This commit fixes the problem by dropping O_EXCL. I don't see any reason
> that it's actually necessary. That means that the loop itself is
> unnecessary, so this commit drops that too.
>
> Debian bug #681880.
> CC: 681880 at bugs.debian.org
> Reported-by: Bastian Blank <waldi at debian.org>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
Reviewed-by: Simon Horman <horms at verge.net.au>
More information about the dev
mailing list