-
Dave Kleikamp authored
In txLazyCommit, we are releasing log->gclock (LOGGC_LOCK) before checking tblk->flag for tblkGC_LAZY. For the case that tblkGC_LAZY is not set, the user thread may release the tblk, and it may be reused and the tblkGC_LAZY bit set again, between the time we release the spinlock until we check the flag. This is a lot to happen in an SMP environment, but when CONFIG_PREEMPT is set, it is very easy to see the problem. The fix is to hold the spinlock until after we've checked the flag. (Yes, I know the symbol names are ugly.)
676968a9