Skip to contentSkip to conversation

mmap/MAP_SHARED and mandatory flock

DISCUSSION Kanoj Sarcar 1 participant 1 message Jun 23, 1999 Memory management

lore
Share & tools
lore
#0 lore raw

It seems to me that the mmap/MAP_SHARED locks_verify_locked() check and fcntl_setlk() have no synchronization. For example, a process invoking fcntl_setlk on a IS_MANDLOCK inode can check that it has no i_mmap vma list, then go on and sleep later before queueing a file_lock on the inode i_flock. Subsequently, an mmaper can come in, invoke locks_verify_locked(), see no file_lock on the inode i_flock, and succeed. The file locker can then wake up and also return success.

Am I missing some synchronization lock/algorithm?

Kanoj
[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/