linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>, Daniel Ribeiro <drwyrm@gmail.com>
Cc: ilya.muromec@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] drivers/input/misc/pcap: a possible sleep-in-atomic bug in pcap_keys_handler
Date: Mon, 5 Feb 2018 15:25:14 -0800	[thread overview]
Message-ID: <20180205232514.GE46524@dtor-ws> (raw)
In-Reply-To: <9af81fe8-e07c-9161-2d85-3eb23a198ec9@gmail.com>

On Tue, Dec 12, 2017 at 04:32:01PM +0800, Jia-Ju Bai wrote:
> According to drivers/input/misc/pcap_keys.c, the kernel module may sleep in
> the interrupt handler.
> The function call path is:
> pcap_keys_handler (interrupt handler)
>   ezx_pcap_read
>     mutex_lock --> may sleep
> 
> I do not find a good way to fix it, so I only report.
> This possible bug is found by my static analysis tool (DSAC) and checked by
> my code review.

Let's see if Daniel's email still work. I am not sure how it worked to
begin with, given that we've been taking that mutex since very
beginning, and pcap_isr_work() disables local interrupts...

Thanks.
 
-- 
Dmitry

      reply	other threads:[~2018-02-05 23:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12  8:32 [BUG] drivers/input/misc/pcap: a possible sleep-in-atomic bug in pcap_keys_handler Jia-Ju Bai
2018-02-05 23:25 ` Dmitry Torokhov [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=20180205232514.GE46524@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=baijiaju1990@gmail.com \
    --cc=drwyrm@gmail.com \
    --cc=ilya.muromec@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).