Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: J. Bruce Fields <bfields@...>
Cc: Pavel Emelyanov <xemul@...>, Andrew Morton <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>, <devel@...>
Date: Tuesday, September 18, 2007 - 12:14 pm

On Tue, 2007-09-18 at 11:19 -0400, J. Bruce Fields wrote:

The behaviour is pretty much undefined if you set/clear mandatory
locking on the file while some application has it open. It is hard to
see how you can avoid that unless you exclude simultaneous chmod,
read(), write(), and fcntl(SETLK) operations.

Note also that strictly speaking, we're not even compliant with the
System V behaviour on read() and write(). See:

  http://www.unix.org.ua/orelly/networking_2ndEd/nfs/ch11_01.htm
and
  http://docs.sun.com/app/docs/doc/801-6736/6i13fom0a?l=en&a=view&q=mandatory+lock

According to these docs, we should be wrapping each and every read() and
write() syscall with a mandatory lock. The fact that we're not, and yet
still not seeing any complaints just goes to show how few people are
actually using and relying on this...

  Trond

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Wake up mandatory locks waiter on chmod (v2), Pavel Emelyanov, (Mon Sep 17, 4:13 am)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Trond Myklebust, (Mon Sep 17, 9:55 am)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Pavel Emelyanov, (Mon Sep 17, 10:16 am)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Trond Myklebust, (Mon Sep 17, 12:00 pm)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Pavel Emelyanov, (Tue Sep 18, 2:33 am)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), J. Bruce Fields, (Tue Sep 18, 11:19 am)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Trond Myklebust, (Tue Sep 18, 12:14 pm)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), J. Bruce Fields, (Tue Sep 18, 12:52 pm)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), Trond Myklebust, (Tue Sep 18, 12:54 pm)
Re: [PATCH] Wake up mandatory locks waiter on chmod (v2), J. Bruce Fields, (Tue Sep 18, 1:40 pm)
[PATCH 2/2] locks: add warning about mandatory locking races, J. Bruce Fields, (Tue Sep 25, 12:56 pm)