Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b0940003f25dd3d2c54c4879809a432a35197f54 Commit: b0940003f25dd3d2c54c4879809a432a35197f54 Parent: 5bd91f18be2fc0dd0384fbfca6d3cdd79a8050dd Author: Nick Piggin <[EMAIL PROTECTED]> AuthorDate: Wed Feb 6 01:37:04 2008 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Feb 6 10:41:04 2008 -0800
vt: bitlock fix vt is missing a memory barrier to close the critical section. Use a real spinlock for this. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/char/vt.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 7a5badf..367be91 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -2400,13 +2400,15 @@ static void vt_console_print(struct console *co, const char *b, unsigned count) { struct vc_data *vc = vc_cons[fg_console].d; unsigned char c; - static unsigned long printing; + static DEFINE_SPINLOCK(printing_lock); const ushort *start; ushort cnt = 0; ushort myx; /* console busy or not yet initialized */ - if (!printable || test_and_set_bit(0, &printing)) + if (!printable) + return; + if (!spin_trylock(&printing_lock)) return; if (kmsg_redirect && vc_cons_allocated(kmsg_redirect - 1)) @@ -2481,7 +2483,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count) notify_update(vc); quit: - clear_bit(0, &printing); + spin_unlock(&printing_lock); } static struct tty_driver *vt_console_device(struct console *c, int *index) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html