lkml.org 
[lkml]   [2006]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectrobust futex deadlock detection patch
Date

Here is a new patch that provides both futex deadlock detection and
prevents ill-behaved and
malicious apps from deadlocking the kernel through the robust futex
interface.

http://source.mvista.com/~dsingleton/patch-2.6.15-rt2-rf1

Deadlock detection is done 'up front' for both POSIX and robust
pthread_mutexes. Non-recursive
POSIX mutexes will hang if deadlocked, as defined by the POSIX spec.
The wait channel they
are hung on is 'futex_deadlock'. This wait channel makes it easy to
spot that your POSIX app
has deadlocked itself via the 'ps' command.

Robust futexes will have -EDEADLK returned to them since there is no
POSIX specification for
robust mutexes, yet, and returning -EDEADLK is more in the spirit of
robustness. Robust
mutexes are cleaned up by the kernel after a thread dies and they also
report to the app if
it is deadlocking itself.

Deadlock detection is something I have wanted to provide for both debug
and production kernels
for a while. It was previously available through DEBUG_DEADLOCKS. I
needed to add the
deadlock dection code for both production and debug kernels to prevent
applications hanging
the kernel.

David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-07 03:42    [W:0.297 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site