mbox series

[v2,0/4] ALSA: Defer async signal handling

Message ID 20220728125945.29533-1-tiwai@suse.de
Headers show
Series ALSA: Defer async signal handling | expand

Message

Takashi Iwai July 28, 2022, 12:59 p.m. UTC
Hi,

this is a revised patch series for another attempt to address the
potential deadlocks via kill_fasync() calls that have been reported by
syzbot for long time.  Only a missing linux/fs.h inclusion was added
from v1 series[1].

Instead of the previous series to drop the async handler[2], this
tries to defer the kill_fasync() call.  A few new common helpers are
introduced at first, then the actual usages are replaced in the
following patches.

The patches passed the quick tests with alsa-lib test cases.


Takashi

[1] https://lore.kernel.org/r/20220726153420.3403-1-tiwai@suse.de
[2] https://lore.kernel.org/r/20220717070549.5993-1-tiwai@suse.de

===

Takashi Iwai (4):
  ALSA: core: Add async signal helpers
  ALSA: timer: Use deferred fasync helper
  ALSA: pcm: Use deferred fasync helper
  ALSA: control: Use deferred fasync helper

 include/sound/control.h |  2 +-
 include/sound/core.h    |  8 ++++
 include/sound/pcm.h     |  2 +-
 sound/core/control.c    |  7 +--
 sound/core/misc.c       | 94 +++++++++++++++++++++++++++++++++++++++++
 sound/core/pcm.c        |  1 +
 sound/core/pcm_lib.c    |  2 +-
 sound/core/pcm_native.c |  2 +-
 sound/core/timer.c      | 11 ++---
 9 files changed, 117 insertions(+), 12 deletions(-)

Comments

Jaroslav Kysela Aug. 1, 2022, 8:08 a.m. UTC | #1
On 28. 07. 22 14:59, Takashi Iwai wrote:
> Hi,
> 
> this is a revised patch series for another attempt to address the
> potential deadlocks via kill_fasync() calls that have been reported by
> syzbot for long time.  Only a missing linux/fs.h inclusion was added
> from v1 series[1].
> 
> Instead of the previous series to drop the async handler[2], this
> tries to defer the kill_fasync() call.  A few new common helpers are
> introduced at first, then the actual usages are replaced in the
> following patches.
> 
> The patches passed the quick tests with alsa-lib test cases.

Thank you for your work. The code looks good (I would only move 
schedule_work() call outside the spin lock context - commented in the patch 
thread).

Reviewed-by: Jaroslav Kysela <perex@perex.cz>