From: Jeff King Date: Mon, 07 Apr 2014 09:36:50 GMT Subject: Re: [PATCH 07/22] lock_file(): always add lock_file object to lock_file_list Message-ID: <20140407093650.GA4252@sigill.intra.peff.net> In-Reply-To: <5341CD33.3000205@alum.mit.edu> On Sun, Apr 06, 2014 at 11:54:59PM +0200, Michael Haggerty wrote: > > I didn't reproduce it experimentally, though. We should be able to just > > > > lk->owner = 0; > > > > before the initial strcpy to fix it, I would think. > > I think that using the owner field to avoid this problem is a bit > indirect, so I will soon submit a fix that involves adding a flag to > lock_file objects indicating whether the filename field currently > contains the name of a file that needs to be deleted. Yeah, I agree that the current code is a bit subtle. I was planning to address this during the tempfile cleanup project (either in GSoC, if it gets a slot, or just doing it myself). But I don't mind if you want to do something in the interim. -Peff