Commit ca1d432a authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds

printk: remove outdated comment

Comment about interesting interlocking between lockbuf_lock and
console_sem is outdated.

It was added in 2002 by commit a880f45a during conversion of
console_lock to console_sem + lockbuf_lock.

At that time release_console_sem() (today's equivalent is
console_unlock()) was indeed using lockbuf_lock to avoid races between
trylock on console_sem in printk() and unlock of console_sem.  However
these days the interlocking is gone and the races are avoided by
rechecking logbuf state after releasing console_sem.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 034633cc
...@@ -206,8 +206,7 @@ struct printk_log { ...@@ -206,8 +206,7 @@ struct printk_log {
}; };
/* /*
* The logbuf_lock protects kmsg buffer, indices, counters. It is also * The logbuf_lock protects kmsg buffer, indices, counters.
* used in interesting ways to provide interlocking in console_unlock();
*/ */
static DEFINE_RAW_SPINLOCK(logbuf_lock); static DEFINE_RAW_SPINLOCK(logbuf_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment