From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: John Tapsell <johnflux@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Peter Hurley <peter@hurleysoftware.com>,
Dave Airlie <airlied@redhat.com>,
linux-fbdev@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fbcon: fix deadlock in fbcon_generic_blank()
Date: Fri, 27 Sep 2013 07:15:48 +0000 [thread overview]
Message-ID: <524530A4.9060300@ti.com> (raw)
In-Reply-To: <CAHQ6N+q13YeM60S_QfRF8Bh+Vc_7yHhCMSABQ=GOtOe5V0EXow@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
Hi,
On 18/09/13 01:29, John Tapsell wrote:
> Do not lock fb_info when calling sending the FB_EVENT_CONBLANK
> event.
>
> 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.
So has this happened for you? Or is it just theoretical?
> fbmem.c sends the FB_EVENT_BLANK without locking lock_fb_info first, so
> this change introduces similar behaviour.
I don't think this is true. FB_EVENT_BLANK is sent in fb_blank(). That
one is called when FBIOBLANK ioctl is called, and it does lock_fb_info().
I'm not familiar with the console code, but removing a lock makes me
feel rather uneasy... But looking at the code, I can also see that
console_lock could already be held, so something here definitely looks
broken.
The only place using FB_EVENT_CONBLANK seems to be backlight, and if I'm
not mistaken, it has its own lock, and doesn't depend on the fb_info
being locked.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: John Tapsell <johnflux@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Peter Hurley <peter@hurleysoftware.com>,
Dave Airlie <airlied@redhat.com>, <linux-fbdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fbcon: fix deadlock in fbcon_generic_blank()
Date: Fri, 27 Sep 2013 10:15:48 +0300 [thread overview]
Message-ID: <524530A4.9060300@ti.com> (raw)
In-Reply-To: <CAHQ6N+q13YeM60S_QfRF8Bh+Vc_7yHhCMSABQ=GOtOe5V0EXow@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
Hi,
On 18/09/13 01:29, John Tapsell wrote:
> Do not lock fb_info when calling sending the FB_EVENT_CONBLANK
> event.
>
> 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.
So has this happened for you? Or is it just theoretical?
> fbmem.c sends the FB_EVENT_BLANK without locking lock_fb_info first, so
> this change introduces similar behaviour.
I don't think this is true. FB_EVENT_BLANK is sent in fb_blank(). That
one is called when FBIOBLANK ioctl is called, and it does lock_fb_info().
I'm not familiar with the console code, but removing a lock makes me
feel rather uneasy... But looking at the code, I can also see that
console_lock could already be held, so something here definitely looks
broken.
The only place using FB_EVENT_CONBLANK seems to be backlight, and if I'm
not mistaken, it has its own lock, and doesn't depend on the fb_info
being locked.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2013-09-27 7:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 22:29 [PATCH] fbcon: fix deadlock in fbcon_generic_blank() John Tapsell
2013-09-17 22:29 ` John Tapsell
2013-09-27 7:15 ` Tomi Valkeinen [this message]
2013-09-27 7:15 ` Tomi Valkeinen
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=524530A4.9060300@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=airlied@redhat.com \
--cc=johnflux@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=plagnioj@jcrosoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.