From: johnflux <johnflux@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Deadlock in fb and tty
Date: Thu, 12 Sep 2013 06:22:24 -0700 (PDT) [thread overview]
Message-ID: <1378992144394-718779.post@n7.nabble.com> (raw)
In-Reply-To: <52308D47.409@hurleysoftware.com>
The following seems to be better:
>From d93c1e9761ff66365d658da7d8d0d33823aa946f Mon Sep 17 00:00:00 2001
From: John Tapsell <johnflux@gmail.com>
Date: Thu, 12 Sep 2013 09:16:12 +0100
Subject: [PATCH] Fix deadlock between fb_info and console. Do not lock
fb_info when calling sending the FB_EVENT_CONBLANK
In fbmem.c, the semantics are that we acquire the lock_fb_info first,
and then console_lock. However when fbcon.c fbcon_generic_blank() is
called, the console lock could already be held. Locking fb_info can
thus cause a deadlock.
fbmem.c sends the FB_EVENT_BLANK without locking lock_fb_info first, so
this change introduces similar behaviour.
---
drivers/video/console/fbcon.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6b4fb5c..8546441 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2333,13 +2333,9 @@ static void fbcon_generic_blank(struct vc_data *vc,
struct fb_info *info,
vc->vc_video_erase_char = oldc;
}
-
- if (!lock_fb_info(info))
- return;
event.info = info;
event.data = ␣
fb_notifier_call_chain(FB_EVENT_CONBLANK, &event);
- unlock_fb_info(info);
}
static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
--
1.8.1.2
How can I get this reviewed/acked please?
--
View this message in context: http://linux-kernel.2935.n7.nabble.com/Deadlock-in-fb-and-tty-tp717929p718779.html
Sent from the Linux Kernel mailing list archive at Nabble.com.
next prev parent reply other threads:[~2013-09-12 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 9:25 Deadlock in fb and tty John Tapsell
2013-09-11 15:33 ` Peter Hurley
2013-09-12 13:22 ` johnflux [this message]
2013-09-17 19:09 ` Peter Hurley
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=1378992144394-718779.post@n7.nabble.com \
--to=johnflux@gmail.com \
--cc=linux-kernel@vger.kernel.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