From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>, Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to 3.12-stable] ALSA: timer: Sync timer deletion at closing the system timer
Date: Thu, 21 Apr 2016 14:14:18 +0200 [thread overview]
Message-ID: <1461240870-2373-5-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1461240870-2373-1-git-send-email-jslaby@suse.cz>
From: Takashi Iwai <tiwai@suse.de>
This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.
===============
commit f146357f069e71aff8e474c625bcebcd3094b3ab upstream.
ALSA timer core framework has no sync point at stopping because it's
called inside the spinlock. Thus we need a sync point at close for
avoiding the stray timer task. This is simply done by implementing
the close callback just calling del_timer_sync(). (It's harmless to
call it unconditionally, as the core timer itself cares of the already
deleted timer instance.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
sound/core/timer.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 38742e826900..10463beae4bb 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1033,11 +1033,21 @@ static int snd_timer_s_stop(struct snd_timer * timer)
return 0;
}
+static int snd_timer_s_close(struct snd_timer *timer)
+{
+ struct snd_timer_system_private *priv;
+
+ priv = (struct snd_timer_system_private *)timer->private_data;
+ del_timer_sync(&priv->tlist);
+ return 0;
+}
+
static struct snd_timer_hardware snd_timer_system =
{
.flags = SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET,
.resolution = 1000000000L / HZ,
.ticks = 10000000L,
+ .close = snd_timer_s_close,
.start = snd_timer_s_start,
.stop = snd_timer_s_stop
};
--
2.8.1
next prev parent reply other threads:[~2016-04-21 12:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 12:14 [patch added to 3.12-stable] cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] fs, seq_file: fallback to vmalloc instead of oom kill processes Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] fs, seqfile: always allow oom killer Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] mmc: Allow forward compatibility for eMMC Jiri Slaby
2016-04-21 12:14 ` Jiri Slaby [this message]
2016-04-21 12:14 ` [patch added to 3.12-stable] SUNRPC: Fix large reads on NFS/RDMA Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] pipe: limit the per-user amount of pages allocated in pipes Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] netfilter: x_tables: validate e->target_offset early Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] netfilter: x_tables: fix unconditional helper Jiri Slaby
2016-04-22 15:38 ` Michal Kubecek
2016-04-23 16:46 ` Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] USB: usbip: fix potential out-of-bounds write Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] fs/pipe.c: skip file_update_time on frozen fs Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] KEYS: Fix handling of stored error in a negatively instantiated user key Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] crypto: crypto_memneq - add equality testing of memory regions w/o timing leaks Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] EVM: Use crypto_memneq() for digest comparisons Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] KVM: x86: removing unused variable Jiri Slaby
2016-04-21 12:14 ` [patch added to 3.12-stable] KVM: x86: Reload pit counters for all channels when restoring state Jiri Slaby
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=1461240870-2373-5-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).