From: Martin Schwidefsky <martin.schwidefsky@debitel.net>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: 2.5.21 - console_unblank.
Date: Tue, 11 Jun 2002 00:32:29 +0200 (CEST) [thread overview]
Message-ID: <E17HXi9-0000Zi-00@skybase> (raw)
Hi,
in my s390 bag of patches I have another one... console_unblank can cause
an endless trap loop if the console semaphore is already taken and
console_unblank is called in interrupt context. To avoid the trap loop
just try to take to semaphore with down_trylock and exit if its fails.
Its not perfect since c->unblank() is not called in this case but way
better than an endlessly looping cpu. s390/s390x are the only two
architectures that still use console_unblank and for us this is acceptable.
The second change in this patch is to increase the log buffer to 128K. We
do print a LOT of message if cio_msg=yes is used.
blue skies,
Martin.
diff -urN linux-2.5.21/kernel/printk.c linux-2.5.21-s390/kernel/printk.c
--- linux-2.5.21/kernel/printk.c Sun Jun 9 07:29:53 2002
+++ linux-2.5.21-s390/kernel/printk.c Tue Apr 30 18:08:43 2002
@@ -31,6 +31,8 @@
#if defined(CONFIG_MULTIQUAD) || defined(CONFIG_IA64)
#define LOG_BUF_LEN (65536)
+#elif defined(CONFIG_ARCH_S390)
+#define LOG_BUF_LEN (131072)
#elif defined(CONFIG_SMP)
#define LOG_BUF_LEN (32768)
#else
@@ -553,7 +555,14 @@
{
struct console *c;
- acquire_console_sem();
+ /*
+ * Try to get the console semaphore. If someone else owns it
+ * we have to return without unblanking because console_unblank
+ * may be called in interrupt context.
+ */
+ if (down_trylock(&console_sem) != 0)
+ return;
+ console_may_schedule = 0;
for (c = console_drivers; c != NULL; c = c->next)
if ((c->flags & CON_ENABLED) && c->unblank)
c->unblank();
reply other threads:[~2002-06-10 20:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E17HXi9-0000Zi-00@skybase \
--to=martin.schwidefsky@debitel.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®