diff options
| author | Takashi Iwai <[email protected]> | 2023-07-06 15:53:57 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2023-07-06 16:01:59 +0000 |
| commit | 89dbb335cb6a627a4067bc42caa09c8bc3326d40 (patch) | |
| tree | 8bf187a9bc1cb9ca2287b3ebafe93c234e57ba6e /scripts/clang-tools/gen_compile_commands.py | |
| parent | Merge branch 'topic/midi20' into for-linus (diff) | |
| download | kernel-89dbb335cb6a627a4067bc42caa09c8bc3326d40.tar.gz kernel-89dbb335cb6a627a4067bc42caa09c8bc3326d40.zip | |
ALSA: jack: Fix mutex call in snd_jack_report()
snd_jack_report() is supposed to be callable from an IRQ context, too,
and it's indeed used in that way from virtsnd driver. The fix for
input_dev race in commit 1b6a6fc5280e ("ALSA: jack: Access input_dev
under mutex"), however, introduced a mutex lock in snd_jack_report(),
and this resulted in a potential sleep-in-atomic.
For addressing that problem, this patch changes the relevant code to
use the object get/put and removes the mutex usage. That is,
snd_jack_report(), it takes input_get_device() and leaves with
input_put_device() for assuring the input_dev being assigned.
Although the whole mutex could be reduced, we keep it because it can
be still a protection for potential races between creation and
deletion.
Fixes: 1b6a6fc5280e ("ALSA: jack: Access input_dev under mutex")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Tested-by: Amadeusz Sławiński <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions
