Skip to content
Commit 6564d0ad authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: ctl: Workaround for lockdep warning wrt card->ctl_files_rwlock



The recent change in lockdep for read lock caused the deadlock
warnings in ALSA control code which uses the read_lock() for
notification and else while write_lock_irqsave() is used for adding
and removing the list entry.  Although a deadlock would practically
never hit in a real usage (the addition and the deletion can't happen
with the notification), it's better to fix the read_lock() usage in a
semantically correct way.

This patch replaces the read_lock() calls with read_lock_irqsave()
version for avoiding a reported deadlock.  The notification code path
takes the irq disablement in anyway, and other code paths are very
short execution, hence there shouldn't be any big performance hit by
this change.

Fixes: e9181886 ("locking: More accurate annotations for read_lock()")
Reported-by: default avatar <syzbot+561a74f84100162990b2@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20200922084953.29018-1-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 534ad9af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment