History

Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Thomas Gleixner: "rt_mutex_futex_unlock() grew a new irq-off call site, but the function assumes that its always called from irq enabled context. Use (un)lock_irqsafe() to handle the new call site correctly" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Make rt_mutex_futex_unlock() safe for irq-off callsites

Linus Torvalds committed 8 years ago

Commit 02bf0ef2 parents abeb752 6b0ef921 file · +3 −2Browse files

Unified · Split

kernel/locking/rtmutex.c+3−2
@@ -1616,11 +1616,12 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock, · 1615 unmodified lines
16161616 void __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
16171617 {
16181618 DEFINE_WAKE_Q(wake_q);
1619+ unsigned long flags;
16191620 bool postunlock;
16201621
1621− raw_spin_lock_irq(&lock->wait_lock);
1622+ raw_spin_lock_irqsave(&lock->wait_lock, flags);
16221623 postunlock = __rt_mutex_futex_unlock(lock, &wake_q);
1623− raw_spin_unlock_irq(&lock->wait_lock);
1624+ raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
16241625
16251626 if (postunlock)
16261627 rt_mutex_postunlock(&wake_q);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t