Re: [PATCH 4/4] resolve_ref_unsafe(): close race condition reading loose refs

2013-06-14 Thread Michael Haggerty
On 06/13/2013 10:22 AM, Thomas Rast wrote: > Michael Haggerty writes: > >> One race is still possible and undetected: another process could >> change the file from a regular file into a symlink between the call to >> lstat and the call to open(). The open() call would silently follow >> the syml

Re: [PATCH 4/4] resolve_ref_unsafe(): close race condition reading loose refs

2013-06-13 Thread Thomas Rast
Michael Haggerty writes: > One race is still possible and undetected: another process could > change the file from a regular file into a symlink between the call to > lstat and the call to open(). The open() call would silently follow > the symlink and not know that something is wrong. I don't

Re: [PATCH 4/4] resolve_ref_unsafe(): close race condition reading loose refs

2013-06-12 Thread Jeff King
On Tue, Jun 11, 2013 at 04:26:20PM +0200, Michael Haggerty wrote: > Please note that if there is some bizarre filesystem somewhere for > which, for a single, static file > > lstat() reports S_ISLNK and readlink() fails with ENOENT or EINVAL > [...] > then the inner loop would never terminate.