Takashi Iwai abad59867a ALSA: core: Add async signal helpers
[ Upstream commit ef34a0ae7a2654bc9e58675e36898217fb2799d8 ]

Currently the call of kill_fasync() from an interrupt handler might
lead to potential spin deadlocks, as spotted by syzkaller.
Unfortunately, it's not so trivial to fix this lock chain as it's
involved with the tasklist_lock that is touched in allover places.

As a temporary workaround, this patch provides the way to defer the
async signal notification in a work.  The new helper functions,
snd_fasync_helper() and snd_kill_faync() are replacements for
fasync_helper() and kill_fasync(), respectively.  In addition,
snd_fasync_free() needs to be called at the destructor of the relevant
file object.

Link: https://lore.kernel.org/r/20220728125945.29533-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-25 11:11:37 +02:00
..
2015-11-18 18:08:54 +00:00
2022-08-25 11:11:37 +02:00
2014-05-05 18:20:22 -07:00
2015-11-30 12:24:12 +00:00
2015-02-02 14:42:42 +01:00
2014-07-04 18:50:51 +01:00
2015-07-09 12:00:11 +01:00
2017-06-28 18:33:31 +01:00
2014-04-18 18:52:18 +01:00
2015-11-18 12:55:25 +00:00
2016-09-24 19:51:57 +01:00
2015-03-11 12:08:20 +00:00
2014-09-15 15:52:03 +02:00