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

Re: [Xen-devel] [PATCH] xenconsole: Ensure exclusive access to console using locks



Ian Campbell writes ("Re: [PATCH] xenconsole: Ensure exclusive access to 
console using locks"):
> I think the answer is to either not remove the lockfile

That is a bit messy (although not entirely wrong).

> or to do so _before_ dropping the lock, which makes the unlink
> itself the effective unlock point.

This is necessary but not sufficient.  With only that change:

  A  open flock    unlink    close

  B            open               flock  .o{ I have the lock }

  C                      open     flock  .o{ I have the lock }

B is mistaken because it olds an fd onto an unlinked file.

Ian.

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


 


Rackspace

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