From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Jookia <contact@jookia.org>
Cc: speakup@linux-speakup.org
Subject: Re: New deadlock?
Date: Fri, 13 Mar 2020 08:30:45 +0100 [thread overview]
Message-ID: <20200313073045.gqkrmmh2mtcsacym@function> (raw)
In-Reply-To: <20200313022237.GF1639@novena-choice-citizen>
Hello,
Jookia, le ven. 13 mars 2020 13:22:37 +1100, a ecrit:
> I was debugging the big deadlock that's fixed in staging-next when I hit
> this backtrace. Anybody have any ideas on what's going on here?
> Possible unsafe locking scenario:\x0a
> CPU0
> ----
> lock(console_lock);
> <Interrupt>
> lock(console_lock);
Which is possible indeed.
> lock_acquire+0x13f/0x370
> ? speakup_clear_selection+0xe/0x20 [speakup]
> console_lock+0x33/0x50
> ? speakup_clear_selection+0xe/0x20 [speakup]
> speakup_clear_selection+0xe/0x20 [speakup]
> speakup_cut+0x19e/0x4b0 [speakup]
[...]
> i8042_interrupt+0x232/0x510 [i8042]
speakup_cut, called from the keyboard interrupt handler, calls
speakup_clear_selection which takes a lock. That can't be safe since
interrupt handlers can't sleep. I guess the speakup_clear_selection call
in speakup_cut should be moved into speakup's set_selection mechanism,
i.e. inside __speakup_set_selection. And actually just get rid of
speakup_clear_selection and simply put clear_selection just before
set_selection_kernel inside __speakup_set_selection.
Samuel
prev parent reply other threads:[~ UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
Jookia
` Samuel Thibault [this message]
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=20200313073045.gqkrmmh2mtcsacym@function \
--to=samuel.thibault@ens-lyon.org \
--cc=contact@jookia.org \
--cc=speakup@linux-speakup.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).