On Tue, 18 Sep 2007, J. Bruce Fields wrote: > On Tue, Sep 18, 2007 at 12:54:56PM -0400, Trond Myklebust wrote: > > > > It gets even better when you throw mmap() into the mix :-) > > Hm. Documentation/mandatory.txt claims that it mandatory locks and > mmap() with MAP_SHARED exclude each other, but I can't see where that's > enfoced. That file doesn't make any mention of the above race. I believe the locks_verify_locked() call from mm/mmap.c prevents mmap'ing shared-write a file with mandatory locks in force; and the mapping_writably_mapped() calls from fs/locks.c prevent mandatory locking on a file while it's mmap'ed shared-write. Though I think there's no lock to prevent those checks racing, so it's not quite watertight. Hugh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Pavel Emelyanov <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Pavel Emelyanov <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Pavel Emelyanov <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: "J. Bruce Fields" <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: "J. Bruce Fields" <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- From: "J. Bruce Fields" <[email protected]>
- [PATCH] Wake up mandatory locks waiter on chmod (v2)
- Prev by Date: Re: [PATCH] Combine instrumentation menus in kernel/Kconfig.instrumentation
- Next by Date: Re: bnx2 dirver's firmware images
- Previous by thread: Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)
- Next by thread: [PATCH 1/2] Documentation: move mandatory locking documentation to filesystems/
- Index(es):