mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: perex@perex.cz, gregkh@linuxfoundation.org, rfontana@redhat.com,
	allison@lohutok.net, tglx@linutronix.de,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] ALSA: core: seq: a possible double-lock bug in snd_seq_midisynth_remove()
Date: Mon, 29 Jul 2019 07:49:23 +0200	[thread overview]
Message-ID: <s5hd0htpezg.wl-tiwai@suse.de> (raw)
In-Reply-To: <50b3b4c4-fe36-8c65-345b-f0a51193726c@gmail.com>

On Mon, 29 Jul 2019 05:54:07 +0200,
Jia-Ju Bai wrote:
> 
> In snd_seq_midisynth_remove(), there is a possible double-lock bug:
> snd_seq_midisynth_remove()
>     mutex_lock(&register_mutex); -- line 421
>     snd_seq_delete_kernel_client() --- line 436
>         seq_free_client() -- line 2244
>             mutex_lock(&register_mutex); -- line 294
> 
> This bug is found by a static analysis tool STCheck written by us.

No, it's a false-positive report.  Both register_mutex's are
static, hence they are local to each file.  That is, you're looking at
two different mutexes.


Takashi

      reply	other threads:[~2019-07-29  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29  3:54 Jia-Ju Bai
2019-07-29  5:49 ` Takashi Iwai [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=s5hd0htpezg.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=allison@lohutok.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=baijiaju1990@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rfontana@redhat.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome