All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH 3/5] ALSA: control: Drop async signal support
Date: Fri, 15 Jul 2022 12:29:33 +0200	[thread overview]
Message-ID: <20220715102935.4695-4-tiwai@suse.de> (raw)
In-Reply-To: <20220715102935.4695-1-tiwai@suse.de>

The async signal (SIGIO) support for ALSA control API has been never
used by real applications, but yet it can be a cause of various
potential deadlocks (although there hasn't been a bug report in this
code path unlike timer and PCM).  Let's drop the feature as the
simplest solution to align with other APIs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/control.h |  1 -
 sound/core/control.c    | 11 -----------
 2 files changed, 12 deletions(-)

diff --git a/include/sound/control.h b/include/sound/control.h
index fcd3cce673ec..0390d4952dac 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -109,7 +109,6 @@ struct snd_ctl_file {
 	int preferred_subdevice[SND_CTL_SUBDEV_ITEMS];
 	wait_queue_head_t change_sleep;
 	spinlock_t read_lock;
-	struct fasync_struct *fasync;
 	int subscribed;			/* read interface is activated */
 	struct list_head events;	/* waiting events for read */
 };
diff --git a/sound/core/control.c b/sound/core/control.c
index 4dba3a342458..3d3b8bf93f80 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -181,7 +181,6 @@ void snd_ctl_notify(struct snd_card *card, unsigned int mask,
 	_found:
 		wake_up(&ctl->change_sleep);
 		spin_unlock(&ctl->read_lock);
-		kill_fasync(&ctl->fasync, SIGIO, POLL_IN);
 	}
 	read_unlock_irqrestore(&card->ctl_files_rwlock, flags);
 }
@@ -2129,14 +2128,6 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)
 EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat);
 #endif
 
-static int snd_ctl_fasync(int fd, struct file * file, int on)
-{
-	struct snd_ctl_file *ctl;
-
-	ctl = file->private_data;
-	return fasync_helper(fd, file, on, &ctl->fasync);
-}
-
 /* return the preferred subdevice number if already assigned;
  * otherwise return -1
  */
@@ -2264,7 +2255,6 @@ static const struct file_operations snd_ctl_f_ops =
 	.poll =		snd_ctl_poll,
 	.unlocked_ioctl =	snd_ctl_ioctl,
 	.compat_ioctl =	snd_ctl_ioctl_compat,
-	.fasync =	snd_ctl_fasync,
 };
 
 /*
@@ -2302,7 +2292,6 @@ static int snd_ctl_dev_disconnect(struct snd_device *device)
 	read_lock_irqsave(&card->ctl_files_rwlock, flags);
 	list_for_each_entry(ctl, &card->ctl_files, list) {
 		wake_up(&ctl->change_sleep);
-		kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
 	}
 	read_unlock_irqrestore(&card->ctl_files_rwlock, flags);
 
-- 
2.35.3


  parent reply	other threads:[~2022-07-15 10:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 10:29 [PATCH 0/5] ALSA: Drop async signal support Takashi Iwai
2022-07-15 10:29 ` [PATCH 1/5] ALSA: timer: " Takashi Iwai
2022-07-15 10:29 ` [PATCH 2/5] ALSA: pcm: " Takashi Iwai
2022-07-16 17:02   ` kernel test robot
2022-07-16 17:53   ` kernel test robot
2022-07-15 10:29 ` Takashi Iwai [this message]
2022-07-15 10:29 ` [PATCH 4/5] ALSA: core: " Takashi Iwai
2022-07-15 10:29 ` [PATCH 5/5] ALSA: doc: Drop stale fasync entry Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220715102935.4695-4-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.