a suspected race bug at locks_remove_flock()

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

 



Hi. I found a suspected race condition bug at locks_remove_flocks()
in fs/locks.c of recent Linux kernel.

This bug is similar to the one reported in
ChangeLog 2.6.24 (commit 85c59580b30c82aa771aa33b37217a6b6851bc14)
and also to the one I report right before.

During the execution of locks_remove_flock(),
Big Kernel Lock(BKL) might be released and re-taken
at the call site of locks_delete_lock() unintentionally
due to the Releasing-On-Block semantics of BKL.
This is because locks_delete_lock() can invoke kmem_cache_alloc()
which can be blocked.

BKL releasing an retaking may result race condition
by breaking atomic execution of the code block
guarded by lock_kernel() and unlock_kernelt().

Please examine the possbility of race condition of this code
and let me know your opinion.

Shin Hong
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux