Takashi Iwai
558ddf7e27
- Backport upstream fixes: cleanups, non-glibc build fixes, fixes and enhancements of pcm_file plugin, etc. 0010-remove-unnecessary-obsolete-compat-hsearch_r.c.patch 0011-local.h-include-sys-types.h-to-fix-issues-with-pcm.h.patch 0012-test-chmap-Add-missing-usage-text-for-s-option.patch 0013-include-global.h-don-t-define-timeval-and-timespec-s.patch 0014-conf.c-use-portable-way-to-initialize-recursive-mute.patch 0015-pcm_file-fix-SEGFAULT-if-file-option-is-missing-whil.patch 0016-pcm_file-fixed-memory-leak.patch 0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch 0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch - Fix aborting in races at closing dmix streams (bnc#852446): 0019-dmix-Don-t-use-assert-and-abort.patch - Don't include modprobe.d hack for 12.2 and older distros, which seem broken on them OBS-URL: https://build.opensuse.org/request/show/208679 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=143
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 49ad6699e68862ef9888bdf10b5bdaa19933f1ea Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Wed, 27 Nov 2013 09:37:54 +0100
|
|
Subject: [PATCH] dmix: Don't use assert() and abort()
|
|
|
|
We seem to still have some races at closing a dmix stream, but
|
|
aborting is the worst option. Let's make not melt down.
|
|
|
|
Reference: https://bugzilla.novell.com/show_bug.cgi?id=852446
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_direct.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/pcm/pcm_direct.h b/src/pcm/pcm_direct.h
|
|
index 70c2c6a0229f..5ae39c0e4237 100644
|
|
--- a/src/pcm/pcm_direct.h
|
|
+++ b/src/pcm/pcm_direct.h
|
|
@@ -274,8 +274,8 @@ static inline int snd_pcm_direct_semaphore_up(snd_pcm_direct_t *dmix, int sem_nu
|
|
static inline int snd_pcm_direct_semaphore_final(snd_pcm_direct_t *dmix, int sem_num)
|
|
{
|
|
if (dmix->locked[sem_num] != 1) {
|
|
- assert(dmix->locked[sem_num] != 1);
|
|
- abort();
|
|
+ SNDMSG("invalid semaphore count to finalize %d: %d", sem_num, dmix->locked[sem_num]);
|
|
+ return -EBUSY;
|
|
}
|
|
return snd_pcm_direct_semaphore_up(dmix, sem_num);
|
|
}
|
|
--
|
|
1.8.4.3
|
|
|