*参照元 [#h2179866] #backlinks *説明 [#te25d0f6] -パス: [[linux-2.6.33/lib/Kconfig.debug]] -ロック状態のスピンロックを free してしまうバグを検知する機能が有効である。 --ロック状態のスピンロックが置かれているメモリ領域を、 kfree() などで解放すると予測できないタイミングでロックが外れる。 **参考 [#z809e5aa] *実装 [#pa847214] config DEBUG_LOCK_ALLOC bool "Lock debugging: detect incorrect freeing of live locks" depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT - --[[linux-2.6.33/CONFIG_DEBUG_KERNEL]] - --[[linux-2.6.33/CONFIG_TRACE_IRQFLAGS_SUPPORT]] - --[[linux-2.6.33/CONFIG_STACKTRACE_SUPPORT]] - --[[linux-2.6.33/CONFIG_LOCKDEP_SUPPORT]] select DEBUG_SPINLOCK select DEBUG_MUTEXES select LOCKDEP - --[[linux-2.6.33/CONFIG_DEBUG_SPINLOCK]] - --[[linux-2.6.33/CONFIG_DEBUG_MUTEXES]] - --[[linux-2.6.33/CONFIG_LOCKDEP]] help This feature will check whether any held lock (spinlock, rwlock, mutex or rwsem) is incorrectly freed by the kernel, via any of the memory-freeing routines (kfree(), kmem_cache_free(), free_pages(), vfree(), etc.), whether a live lock is incorrectly reinitialized via spin_lock_init()/mutex_init()/etc., or whether there is any lock held during task exit. *コメント [#cf0bc377]