Subject : 2.6.35-rc3 deadlocks on semaphore operations
Submitter : Christoph Lameter <email@example.com>
Date : 2010-06-18 14:49
Message-ID : alpine.DEB.firstname.lastname@example.org
References : http://marc.info/?l=linux-kernel&m=127687262727707&w=2
This entry is being used for tracking a regression from 2.6.34. Please don't
close it until the problem is fixed in the mainline.
Created attachment 26915 [details]
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.
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 <email@example.com>
Fixed by commit c61284e99191b2284fb74dae6961d4d09e4e59e8 .