• Darren Hart's avatar
    futex: Move drop_futex_key_refs out of spinlock'ed region · 81e6fd57
    Darren Hart authored
    commit 89061d3d upstream.
    
    When requeuing tasks from one futex to another, the reference held
    by the requeued task to the original futex location needs to be
    dropped eventually.
    
    Dropping the reference may ultimately lead to a call to
    "iput_final" and subsequently call into filesystem- specific code -
    which may be non-atomic.
    
    It is therefore safer to defer this drop operation until after the
    futex_hash_bucket spinlock has been dropped.
    
    Originally-From: Helge Bahmann <hcb@chaoticmind.net>
    Signed-off-by: default avatarDarren Hart <dvhltc@us.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: Dinakar Guniguntala <dino@in.ibm.com>
    Cc: John Stultz <johnstul@linux.vnet.ibm.com>
    Cc: Sven-Thorsten Dietrich <sdietrich@novell.com>
    Cc: John Kacur <jkacur@redhat.com>
    LKML-Reference: <4AD7A298.5040802@us.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    81e6fd57
futex.c 66.9 KB