]> git.baikalelectronics.ru Git - kernel.git/commit
locks: fix possible infinite loop in posix deadlock detection
authorJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 30 Oct 2007 15:20:02 +0000 (11:20 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 30 Oct 2007 16:04:18 +0000 (09:04 -0700)
commitfc467b3788988f89f837c01b0588ccf4cdad86e4
treee0895adabfda85bd9dc7514265940fdef8b1e506
parent9c63d9d7d89c39c89fd4c639582d71aba35fb407
locks: fix possible infinite loop in posix deadlock detection

It's currently possible to send posix_locks_deadlock() into an infinite
loop (under the BKL).

For now, fix this just by bailing out after a few iterations.  We may
want to fix this in a way that better clarifies the semantics of
deadlock detection.  But that will take more time, and this minimal fix
is probably adequate for any realistic scenario, and is simple enough to
be appropriate for applying to stable kernels now.

Thanks to George Davis for reporting the problem.

Cc: "George G. Davis" <gdavis@mvista.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/locks.c