From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [patch 1/2] OSS: soundcard: locking bug in sound_ioctl() Date: Mon, 11 Oct 2010 13:59:35 +0200 Message-ID: References: <20101010173352.GB5851@bicker> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 90691103921 for ; Mon, 11 Oct 2010 13:59:35 +0200 (CEST) In-Reply-To: <20101010173352.GB5851@bicker> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Dan Carpenter Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Arnd Bergmann List-Id: alsa-devel@alsa-project.org At Sun, 10 Oct 2010 19:33:52 +0200, Dan Carpenter wrote: > > 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 Applied now. Thanks. Takashi > 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; > > } >