Skip to contentSkip to conversation

a suspected race at __posix_lock_file()

DISCUSSION 홍신 shin hong 2 participants 2 messages Jul 24, 2009 – Jul 26, 2009 VFS

lore
Share & tools
lore
#0 lore raw

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

This bug is similar to the one reported in ChangeLog 2.6.24 ( commit 85c59580b30c82aa771aa33b37217a6b6851bc14 ).

Big Kernel Lock(BKL) might be released and re-taken
at the call site of locks_delete_lock()
since Releasing-On-Block semantics of BKL. Locks_delete_lock() may be blocked by kmem_cache_alloc() invocation.

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

#1 lore raw
Quoted 10 lines · ?????? shin hong

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

This bug is similar to the one reported in ChangeLog 2.6.24 ( commit 85c59580b30c82aa771aa33b37217a6b6851bc14 ).

Big Kernel Lock(BKL) might be released and re-taken
at the call site of locks_delete_lock()
since Releasing-On-Block semantics of BKL. Locks_delete_lock() may be blocked by kmem_cache_alloc() invocation.

Could you explain to me how locks_delete_lock() calls kmem_cache_alloc()?

Quoted 6 lines

Please examine the possbility of race condition of this code and let me know your opinion.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 4 lines
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."