• Keith Owens's avatar
    [IA64] Avoid a rare deadlock during unwind · b960a828
    Keith Owens authored
    There is a rare deadlock condition during unwind script creation.  If
    build_script() is interrupted in the middle of creating the script, it
    holds the script write lock.  If the interrupt handler needs to call
    unwind for some failure condition, unwind will try to read the
    incomplete script and will deadlock on the script lock.
    
    The fix is to disable interrupts while building the script, so
    interrupt handlers never see partial scripts.
    
    Promoting spin_lock_irqsave() from script_new() to find_save_locs()
    changes the indentation, so the patch looks bigger than it really is.
    Signed-off-by: default avatarKeith Owens <kaos@sgi.com>
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    b960a828
unwind.c 62 KB