Skip to content

Commit

Permalink
OSS: soundcard: locking bug in sound_ioctl()
Browse files Browse the repository at this point in the history
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 <error27@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Oct 11, 2010
1 parent cb655d0 commit d4cfa4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/oss/soundcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit d4cfa4d

Please sign in to comment.