public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: John Tapsell <johnflux@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Deadlock in fb and tty
Date: Wed, 11 Sep 2013 11:33:27 -0400	[thread overview]
Message-ID: <52308D47.409@hurleysoftware.com> (raw)
In-Reply-To: <CAHQ6N+pQpfmG-b_9iv0Ajg5EYPjfEK0=KYcQa0DLVmyN8VKZrQ@mail.gmail.com>

On 09/11/2013 05:25 AM, John Tapsell wrote:
> Hi,
>    I'm consistently and constantly hitting a deadlock.
>
> console_callback in drivers/tty/vt/vt.c does:  console_lock()  and then calls:
>    do_blank_screen, which calls:
>      vc->vc_sw->con_blank(..)  which can be a pointer to the function:
>        fbcon_blank in video/console/fbcon.c.  This is missing a
> WARN_CONSOLE_UNLOCKED.  This calls:
>          fbcon_generic_blank which does lock_fb_info(info)
>
> So we have a console_lock() followed by a lock_fb_info(info).
>
> Now if while that is running, we have an ioctl call:
>
> do_fb_ioctl in drivers/video/fbmem.c which does:
>                 if (!lock_fb_info(info))
>                          return -ENODEV;
>                  console_lock();
>
>
> So it tries to acquire the same locks in the reverse order.  This
> deadlocks consistently for me.
>
> (I'm also curious why I'm hitting this continually, when everyone else
> seems to be okay.)
>
> I understand that this is really difficult to fix, but if anyone has
> even a suggestion on how to hack it to make it work for me, I'd be
> very grateful.

As a temporary workaround, you can disable timed console blanking on the
kernel command line with 'consoleblank=0'.

Regards,
Peter Hurley


  reply	other threads:[~2013-09-11 15:33 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 [this message]
2013-09-12 13:22   ` johnflux
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=52308D47.409@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=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