VirtualBox

Ignore:
Timestamp:
Feb 5, 2013 8:41:50 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83582
Message:

BUGZ: 6570,6602 Disable lock validator for linux r0drv when CONFIG_PROVE_LOCKING is enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/spinlock-r0drv-linux.c

    r44528 r44535  
    9595#endif
    9696
    97     /*
    98        PLEASE DO NOT MODIFY THE NEXT FOUR LINES OF CODE!
    99 
    100        We use this approach in order to split RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE and
    101        RTSPINLOCK_FLAGS_INTERRUPT_SAFE spinlocks into separated locking classes when
    102        CONFIG_PROVE_LOCKING kernel option is enabled. Using single spin_lock_init()
    103        call will trigger kernel warning regarding to incorrect spinlock usage.
    104      */
    105     if (fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE)
    106         spin_lock_init(&pThis->Spinlock);
    107     else
    108         spin_lock_init(&pThis->Spinlock);
     97    spin_lock_init(&pThis->Spinlock);
    10998
    11099    *pSpinlock = pThis;
     
    142131              ("pThis=%p u32Magic=%08x\n", pThis, pThis ? (int)pThis->u32Magic : 0));
    143132
     133#ifdef CONFIG_PROVE_LOCKING
     134    lockdep_off();
     135#endif
    144136    if (pThis->fFlags & RTSPINLOCK_FLAGS_INTERRUPT_SAFE)
    145137    {
     
    150142    else
    151143        spin_lock(&pThis->Spinlock);
     144#ifdef CONFIG_PROVE_LOCKING
     145    lockdep_on();
     146#endif
    152147
    153148    RT_ASSERT_PREEMPT_CPUID_SPIN_ACQUIRED(pThis);
     
    164159    RT_ASSERT_PREEMPT_CPUID_SPIN_RELEASE(pThis);
    165160
     161#ifdef CONFIG_PROVE_LOCKING
     162    lockdep_off();
     163#endif
    166164    if (pThis->fFlags & RTSPINLOCK_FLAGS_INTERRUPT_SAFE)
    167165    {
     
    172170    else
    173171        spin_unlock(&pThis->Spinlock);
     172#ifdef CONFIG_PROVE_LOCKING
     173    lockdep_on();
     174#endif
    174175
    175176    RT_ASSERT_PREEMPT_CPUID();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette