lkml.org 
[lkml]   [1999]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: recursive locks in kernel?
Date
In message <Pine.LNX.4.10.9909240520080.37934025-100000@csemt83.cse.iitk.ac.in>
you write:
> and some of them not. Now the problem arises if this lower level function
> also wants to lock the same data because it does not know whether the data is
> already locked by some higher level function or not. If it just locks it
> blindly then this could lead to a deadlock.

It can be a problem: there are cases where a `raw' version of a
function is required (usually __xxx) which doesn't grab the lock.

However, if your calls are so convoluted that you don't realize that a
public lock will be grabbed, you've got more subtle deadlock problems
with grabbing locks out of order, which can't be hacked around by
making locks recursive.

My 2c,
Rusty.
--
Hacking time.

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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.029 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site