Bug 16255
Summary: | 2.6.35-rc3 deadlocks on semaphore operations | ||
---|---|---|---|
Product: | Process Management | Reporter: | Maciej Rutecki (maciej.rutecki) |
Component: | Other | Assignee: | process_other |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | cl, maciej.rutecki, manfred, rjw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.35-rc3 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 16055 | ||
Attachments: | bugfix |
Description
Maciej Rutecki
2010-06-20 06:54:16 UTC
Created attachment 26915 [details]
bugfix
Hi,
I think I found it:
Previously, queue.status was never IN_WAKEUP when the semaphore spinlock was held.
The last patch changes that:
Now the change from IN_WAKEUP to the final result code happens after the the semaphore spinlock is dropped.
Thus a task can observe IN_WAKEUP even when it acquired the semaphore spinlock.
As a result, semop() sometimes returned 1 (IN_WAKEUP) for a successful operation.
Attached is a patch that should fix the bug.
--
Manfred
The bugfix is in Andrew's tree and I couldn't find any further regressions. Maciej, could you close the bug when the patch appears in mainline? Patch : http://marc.info/?l=linux-kernel&m=127731055203402&w=2 Handled-By : Manfred Spraul <manfred@colorfullife.com> Fixed by commit c61284e99191b2284fb74dae6961d4d09e4e59e8 . |