public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] OSS: soundcard: locking bug in sound_ioctl()
@ 2010-10-10 17:33 Dan Carpenter
  2010-10-10 18:39 ` Arnd Bergmann
  2010-10-11 11:59 ` Takashi Iwai
  0 siblings, 2 replies; 12+ messages in thread
From: Dan Carpenter @ 2010-10-10 17:33 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, alsa-devel, kernel-janitors, Arnd Bergmann

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>

diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index 938ed94..a5ab61e 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -392,11 +392,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;
 
 	}

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-10-12  6:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-10 17:33 [patch 1/2] OSS: soundcard: locking bug in sound_ioctl() Dan Carpenter
2010-10-10 18:39 ` Arnd Bergmann
2010-10-11  8:13   ` Arnd Bergmann
2010-10-11  8:50     ` Johannes Berg
2010-10-11 10:50       ` Arnd Bergmann
2010-10-11 10:52         ` Johannes Berg
2010-10-11 18:54           ` Josh Triplett
2010-10-11 20:42             ` Arnd Bergmann
2010-10-11 22:23               ` Josh Triplett
2010-10-12  6:39                 ` Arnd Bergmann
2010-10-12  6:43                   ` Josh Triplett
2010-10-11 11:59 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox