On Sun, 28 Oct 2007, Matthew Wilcox wrote: > Bzzt. You get a false deadlock with multiple threads like so: > Thread A of task B takes lock 1 > Thread C of task D takes lock 2 > Thread C of task D blocks on lock 1 > Thread E of task B blocks on lock 2 A potential for deadlock occurs if a process controlling a locked region is put to sleep by attempting to lock another process' locked region. If the system detects that sleeping until a locked region is unlocked would cause a deadlock, fcntl() shall fail with an [EDEADLK] error. This is what POSIX says [1], even after being modified with respect to POSIX Threads Extension, right? So it doesn't deal with threads at all, just processess are taken into account. Probably for a reason :) [1] http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html -- Jiri Kosina - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Matthew Wilcox <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- References:
- [RFC][PATCH] Fix hang in posix_locks_deadlock()
- From: "George G. Davis" <[email protected]>
- Re: [RFC][PATCH] Fix hang in posix_locks_deadlock()
- From: "George G. Davis" <[email protected]>
- Re: [RFC][PATCH] Fix hang in posix_locks_deadlock()
- From: "J. Bruce Fields" <[email protected]>
- Re: [RFC][PATCH] Fix hang in posix_locks_deadlock()
- From: "J. Bruce Fields" <[email protected]>
- [PATCH] locks: fix possible infinite loop in posix deadlock detection
- From: "J. Bruce Fields" <[email protected]>
- [RFC, PATCH] locks: remove posix deadlock detection
- From: "J. Bruce Fields" <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Matthew Wilcox <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Alan Cox <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Matthew Wilcox <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Trond Myklebust <[email protected]>
- Re: [RFC, PATCH] locks: remove posix deadlock detection
- From: Matthew Wilcox <[email protected]>
- [RFC][PATCH] Fix hang in posix_locks_deadlock()
- Prev by Date: Re: [RFC, PATCH] locks: remove posix deadlock detection
- Next by Date: Re: 2.6.24-rc1-git4: Reported regressions from 2.6.23
- Previous by thread: Re: [RFC, PATCH] locks: remove posix deadlock detection
- Next by thread: Re: [RFC, PATCH] locks: remove posix deadlock detection
- Index(es):