aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-01-28 17:53:41 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:20 -0500
commit4939c660341d1439b8c70c3e006e7fc182f5111e (patch)
tree53a58cd398fed99ca24ce1f243955a3e024ba6d9 /sound/core
parentce875f079efcfdcf693de89c7ab0ca7f71a9bdce (diff)
[ALSA] Fix Oops with PCM OSS sync
The PCM OSS emulation can cause Oops at sync operation due to the wrong data size calculation. Typically happening on Sparc64: http://lkml.org/lkml/2008/1/24/426 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/oss/pcm_oss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 092c2d84a9bc..4c601b192ddf 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1621,6 +1621,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1621 snd_pcm_format_set_silence(runtime->format, 1621 snd_pcm_format_set_silence(runtime->format,
1622 runtime->oss.buffer, 1622 runtime->oss.buffer,
1623 size1); 1623 size1);
1624 size1 /= runtime->channels; /* frames */
1624 fs = snd_enter_user(); 1625 fs = snd_enter_user();
1625 snd_pcm_lib_write(substream, (void __user *)runtime->oss.buffer, size1); 1626 snd_pcm_lib_write(substream, (void __user *)runtime->oss.buffer, size1);
1626 snd_leave_user(fs); 1627 snd_leave_user(fs);