Changeset 759ea0d in mainline for kernel/generic/src/synch/futex.c


Ignore:
Timestamp:
2014-11-23T10:09:32Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
235d31d
Parents:
21373712
Message:

Lock futex_ht_lock spinlock after page_table_lock()

The current locking order triggers a kernel assertion on sparc64/sun4v,
because the global page table mutex is being locked when the
futex_ht_lock spinlock is held. The locking order therefore needs to be
changed so that the mutex is acquired before the spinlock.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/futex.c

    r21373712 r759ea0d  
    288288static bool find_futex_paddr(uintptr_t uaddr, uintptr_t *paddr)
    289289{
     290        page_table_lock(AS, false);
    290291        spinlock_lock(&futex_ht_lock);
    291         page_table_lock(AS, false);
    292292
    293293        bool found = false;
     
    299299        }
    300300       
     301        spinlock_unlock(&futex_ht_lock);
    301302        page_table_unlock(AS, false);
    302         spinlock_unlock(&futex_ht_lock);
    303303       
    304304        return found;
Note: See TracChangeset for help on using the changeset viewer.