From: Dan Carpenter Date: Sun, 10 Oct 2010 17:33:52 +0000 (+0200) Subject: OSS: soundcard: locking bug in sound_ioctl() X-Git-Tag: v2.6.36-rc8~16^2~2 X-Git-Url: http://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=d4cfa4d12f46e2520f4c1d1a92e891ce068b7464 OSS: soundcard: locking bug in sound_ioctl() We shouldn't return directly here because we're still holding the &soundcard_mutex. This bug goes all the way back to the start of git. It's strange that no one has complained about it as a runtime bug. CC: stable@kernel.org Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann Signed-off-by: Takashi Iwai --- diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index 92aa762ffb7..07f803e6d20 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -391,11 +391,11 @@ static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case SND_DEV_DSP: case SND_DEV_DSP16: case SND_DEV_AUDIO: - return audio_ioctl(dev, file, cmd, p); + ret = audio_ioctl(dev, file, cmd, p); break; case SND_DEV_MIDIN: - return MIDIbuf_ioctl(dev, file, cmd, p); + ret = MIDIbuf_ioctl(dev, file, cmd, p); break; }