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/