lkml.org 
[lkml]   [1999]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux-2.2.2-pre2..


[ Thinking more about it ]

On Sun, 7 Feb 1999, Andrea Arcangeli wrote:
>
> When do_tty_hangup() runs current->lock_depth can be easily >=0 and we
> have the real spinlock unlocked so lock_kernel() does nothing and
> do_tty_hangup() can race fine with the other CPU that is holding the lock
> now.

Ahh, now I see your argument.

You are correct. The scheduler code is special, and the scheduler will
leave lock_depth set even though it has released the lock. I did that as a
performance optimization, because I thought nobody would ever care, but
it's obvious that yes, you do have to also set lock_depth to -1 inside the
scheduler.

Good point, sorry for not catching on to what you meant.

Linus


-
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:50    [W:0.050 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site