From: Jan Kiszka <jan.kiszka@siemens.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Kosina <jikos@jikos.cz>, LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@openvz.org>,
Kirill Korotaev <dev@sw.ru>
Subject: Re: [PATCH] printk deadlocks if called with runqueue lock held
Date: Fri, 18 Jan 2008 15:55:13 +0100 [thread overview]
Message-ID: <4790BDD1.40808@siemens.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0801180634040.7574@gandalf.stny.rr.com>
Steven Rostedt wrote:
...
> @@ -978,7 +980,13 @@ void release_console_sem(void)
> console_locked = 0;
> up(&console_sem);
Hmm, just looking at this fragment: Doesn't up() include the risk of
running onto the runqueue lock as well?
> spin_unlock_irqrestore(&logbuf_lock, flags);
> - if (wake_klogd)
> + /*
> + * If we try to wake up klogd while printing with the runqueue lock
> + * held, this will deadlock. We don't have access to the runqueue
> + * lock from here, but just checking for interrupts disabled
> + * should be enough.
> + */
> + if (!irqs_disabled() && wake_klogd)
> wake_up_klogd();
> }
> EXPORT_SYMBOL(release_console_sem);
Jan
next prev parent reply other threads:[~2008-01-18 14:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 1:04 [PATCH] printk deadlocks if called with runqueue lock held Steven Rostedt
2008-01-18 1:19 ` Andrew Morton
2008-01-18 1:57 ` Steven Rostedt
2008-01-18 1:31 ` Linus Torvalds
2008-01-18 1:52 ` Steven Rostedt
2008-01-18 11:04 ` Jiri Kosina
2008-01-18 11:35 ` Steven Rostedt
2008-01-18 14:55 ` Jan Kiszka [this message]
2008-01-18 16:26 ` Steven Rostedt
2008-01-18 17:30 ` Linus Torvalds
2008-01-23 13:31 ` Pavel Machek
2008-01-23 18:36 ` Steven Rostedt
2008-01-24 9:00 ` Pavel Machek
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=4790BDD1.40808@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=adobriyan@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=dev@sw.ru \
--cc=jikos@jikos.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/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