lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5h3675678t.wl-tiwai@suse.de>
Date:   Mon, 08 Jun 2020 15:02:10 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ALSA: pcm: fix snd_pcm_link() lockdep splat

On Mon, 08 Jun 2020 12:06:32 +0200,
Michał Mirosław wrote:
> 
> Add and use snd_pcm_stream_lock_nested() in snd_pcm_link/unlink
> implementation.  The code is fine, but generates a lockdep complaint:
> 
> ============================================
> WARNING: possible recursive locking detected
> 5.7.1mq+ #381 Tainted: G           O
> --------------------------------------------
> pulseaudio/4180 is trying to acquire lock:
> ffff888402d6f508 (&group->lock){-...}-{2:2}, at: snd_pcm_common_ioctl+0xda8/0xee0 [snd_pcm]
> 
> but task is already holding lock:
> ffff8883f7a8cf18 (&group->lock){-...}-{2:2}, at: snd_pcm_common_ioctl+0xe4e/0xee0 [snd_pcm]
> 
> other info that might help us debug this:
>  Possible unsafe locking scenario:
> 
>        CPU0
>        ----
>   lock(&group->lock);
>   lock(&group->lock);
> 
>  *** DEADLOCK ***
> 
>  May be due to missing lock nesting notation
> 
> 2 locks held by pulseaudio/4180:
>  #0: ffffffffa1a05190 (snd_pcm_link_rwsem){++++}-{3:3}, at: snd_pcm_common_ioctl+0xca0/0xee0 [snd_pcm]
>  #1: ffff8883f7a8cf18 (&group->lock){-...}-{2:2}, at: snd_pcm_common_ioctl+0xe4e/0xee0 [snd_pcm]
> [...]
> 
> Cc: stable@...r.kernel.org
> Fixes: f57f3df03a8e ("ALSA: pcm: More fine-grained PCM link locking")
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>

Applied now.  Thanks.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ