diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-07-29 18:06:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-07-30 07:46:00 +0200 |
commit | fcc62b19104a67b9a2941513771e09389b75bd95 (patch) | |
tree | f8af9f065235beaaeae04aa9cabe9942d84ae969 /sound/core/memalloc.c | |
parent | 3bb668264db5c68a02b557b3052644181bb4f4be (diff) | |
download | linux-fcc62b19104a67b9a2941513771e09389b75bd95.tar.gz linux-fcc62b19104a67b9a2941513771e09389b75bd95.tar.bz2 linux-fcc62b19104a67b9a2941513771e09389b75bd95.zip |
ALSA: control: Take power_ref lock primarily
The code path for kcontrol accesses have often nested locks of both
card's controls_rwsem and power_ref, and applies in that order.
However, what could take much longer is the latter, power_ref; it
waits for the power state of the device, and it pretty much depends on
the user's action.
This patch swaps the locking order of those locks to a more natural
way, namely, power_ref -> controls_rwsem, in order to shorten the time
of possible nested locks. For consistency, power_ref is taken always
in the top-level caller side (that is, *_user() functions and the
ioctl handler itself).
Link: https://patch.msgid.link/20240729160659.4516-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/memalloc.c')
0 files changed, 0 insertions, 0 deletions