This is a note to let you know that I've just added the patch titled ALSA: seq-oss: Initialize MIDI clients asynchronously to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-seq-oss-initialize-midi-clients-asynchronously.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 256ca9c3ad5013ff8a8f165e5a82fab437628c8e Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Tue, 16 Jul 2013 12:17:49 +0200 Subject: ALSA: seq-oss: Initialize MIDI clients asynchronously From: Takashi Iwai <tiwai@xxxxxxx> commit 256ca9c3ad5013ff8a8f165e5a82fab437628c8e upstream. We've got bug reports that the module loading stuck on Debian system with 3.10 kernel. The debugging session revealed that the initial registration of OSS sequencer clients stuck at module loading time, which involves again with request_module() at the init phase. This is triggered only by special --install stuff Debian is using, but it's still not good to have such loops. As a workaround, call the registration part asynchronously. This is a better approach irrespective of the hang fix, in anyway. Reported-and-tested-by: Philipp Matthias Hahn <pmhahn@xxxxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/core/seq/oss/seq_oss_init.c | 16 +++++++++++++--- sound/core/seq/oss/seq_oss_midi.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -31,6 +31,7 @@ #include <linux/export.h> #include <linux/moduleparam.h> #include <linux/slab.h> +#include <linux/workqueue.h> /* * common variables @@ -60,6 +61,14 @@ static void free_devinfo(void *private); #define call_ctl(type,rec) snd_seq_kernel_client_ctl(system_client, type, rec) +/* call snd_seq_oss_midi_lookup_ports() asynchronously */ +static void async_call_lookup_ports(struct work_struct *work) +{ + snd_seq_oss_midi_lookup_ports(system_client); +} + +static DECLARE_WORK(async_lookup_work, async_call_lookup_ports); + /* * create sequencer client for OSS sequencer */ @@ -85,9 +94,6 @@ snd_seq_oss_create_client(void) system_client = rc; debug_printk(("new client = %d\n", rc)); - /* look up midi devices */ - snd_seq_oss_midi_lookup_ports(system_client); - /* create annoucement receiver port */ memset(port, 0, sizeof(*port)); strcpy(port->name, "Receiver"); @@ -115,6 +121,9 @@ snd_seq_oss_create_client(void) } rc = 0; + /* look up midi devices */ + schedule_work(&async_lookup_work); + __error: kfree(port); return rc; @@ -160,6 +169,7 @@ receive_announce(struct snd_seq_event *e int snd_seq_oss_delete_client(void) { + cancel_work_sync(&async_lookup_work); if (system_client >= 0) snd_seq_delete_kernel_client(system_client); --- a/sound/core/seq/oss/seq_oss_midi.c +++ b/sound/core/seq/oss/seq_oss_midi.c @@ -72,7 +72,7 @@ static int send_midi_event(struct seq_os * look up the existing ports * this looks a very exhausting job. */ -int __init +int snd_seq_oss_midi_lookup_ports(int client) { struct snd_seq_client_info *clinfo; Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-3.10/alsa-hda-fix-missing-mic-boost-controls-for-via-codecs.patch queue-3.10/alsa-hda-fix-return-value-of-snd_hda_check_power_state.patch queue-3.10/asoc-atmel-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-usx2y-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/asoc-s6000-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-hda-add-new-gpu-codec-id-to-snd-hda.patch queue-3.10/alsa-ua101-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-6fire-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-hda-fix-eapd-vmaster-hook-for-ad1884-co.patch queue-3.10/alsa-hda-cache-the-mux-selection-for-generic-hdmi.patch queue-3.10/alsa-seq-oss-initialize-midi-clients-asynchronously.patch queue-3.10/alsa-atiixp-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-asihpi-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-pxa2xx-fix-unlocked-snd_pcm_stop-call.patch queue-3.10/alsa-hda-fix-the-max-length-of-control-name-in-generic-parser.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html