Bug 799386 - The futex proxy handler grabs the pi_lock without disabling interrupts
Summary: The futex proxy handler grabs the pi_lock without disabling interrupts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 2.2
: ---
Assignee: John Kacur
QA Contact: David Sommerseth
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-02 16:02 UTC by Steven Rostedt
Modified: 2016-05-22 23:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Interrupts can take the same pi_lock as the task Consequence: Deadlock from an interrupt taking the pi_lock Fix: Disable interrupts when taking pi_lock Result: Deadlock is prevented.
Clone Of:
Environment:
Last Closed: 2012-09-19 18:03:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Disable interrupts when taking pi_lock() (1.19 KB, patch)
2012-03-02 16:04 UTC, Steven Rostedt
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1282 0 normal SHIPPED_LIVE Moderate: kernel-rt security, bug fix, and enhancement update 2012-09-19 22:02:30 UTC

Description Steven Rostedt 2012-03-02 16:02:19 UTC
The futex proxy handler grabs the task's pi_lock without disabling interrupts. If an interrupt were to come in while the lock was held, and that interrupt took the same pi_lock, it would cause a deadlock.

Comment 1 Steven Rostedt 2012-03-02 16:04:22 UTC
Created attachment 567095 [details]
Disable interrupts when taking pi_lock()

Use raw_spin_lock_irq() instead of raw_spin_lock() when taking pi_lock in the futex proxy handler.

Comment 2 John Kacur 2012-05-23 13:15:57 UTC
The fix here is equivalent to 9358ad7
git describe --contains 9358ad7
v3.2.14-rt24~10

Modifying kernel-rt.spec to document this.

Comment 5 John Kacur 2012-06-20 21:17:18 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Interrupts can take the same pi_lock as the task
Consequence: Deadlock from an interrupt taking the pi_lock
Fix: Disable interrupts when taking pi_lock
Result: Deadlock is prevented.

Comment 7 Steven Rostedt 2012-07-03 14:24:34 UTC
The patch was added to 3.2.14-rt24 (upstream stable-rt).

Comment 10 errata-xmlrpc 2012-09-19 18:03:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1282.html


Note You need to log in before you can comment on or make changes to this bug.