]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
OSS: soundcard: locking bug in sound_ioctl()
authorDan Carpenter <error27@gmail.com>
Sun, 10 Oct 2010 17:33:52 +0000 (19:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:22 +0000 (21:51 -0700)
commit d4cfa4d12f46e2520f4c1d1a92e891ce068b7464 upstream.

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.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/oss/soundcard.c

index 2d9c51312622fe4a10ea0bf202f24fb092a895ac..19ce86d445c24c60b8f4b2de1f8720fabbc66416 100644 (file)
@@ -389,11 +389,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;
 
        }