Skip to content

Commit

Permalink
[ALSA] Fix Oops with PCM OSS sync
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 31, 2008
1 parent ce875f0 commit 4939c66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
snd_pcm_format_set_silence(runtime->format,
runtime->oss.buffer,
size1);
size1 /= runtime->channels; /* frames */
fs = snd_enter_user();
snd_pcm_lib_write(substream, (void __user *)runtime->oss.buffer, size1);
snd_leave_user(fs);
Expand Down

0 comments on commit 4939c66

Please sign in to comment.