mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH 1/2] sound: pcm_oss, fix locking typo
Date: Thu, 12 Mar 2009 08:28:55 +0100	[thread overview]
Message-ID: <s5h1vt32o94.wl%tiwai@suse.de> (raw)
In-Reply-To: <1236798701-14332-1-git-send-email-jirislaby@gmail.com>

At Wed, 11 Mar 2009 20:11:40 +0100,
Jiri Slaby wrote:
> 
> s/mutex_lock/mutex_unlock/ on 2 fail paths in snd_pcm_oss_proc_write.
> Probably a typo, lock should be unlocked when leaving the function.
> 
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

Thanks, applied both patches now.


Takashi

> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/core/oss/pcm_oss.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
> index ddf83c8..dda000b 100644
> --- a/sound/core/oss/pcm_oss.c
> +++ b/sound/core/oss/pcm_oss.c
> @@ -2887,7 +2887,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
>  			setup = kmalloc(sizeof(*setup), GFP_KERNEL);
>  			if (! setup) {
>  				buffer->error = -ENOMEM;
> -				mutex_lock(&pstr->oss.setup_mutex);
> +				mutex_unlock(&pstr->oss.setup_mutex);
>  				return;
>  			}
>  			if (pstr->oss.setup_list == NULL)
> @@ -2901,7 +2901,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
>  			if (! template.task_name) {
>  				kfree(setup);
>  				buffer->error = -ENOMEM;
> -				mutex_lock(&pstr->oss.setup_mutex);
> +				mutex_unlock(&pstr->oss.setup_mutex);
>  				return;
>  			}
>  		}
> -- 
> 1.6.2
> caught by stanse
> 

      parent reply	other threads:[~2009-03-12  7:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 19:11 Jiri Slaby
2009-03-11 19:11 ` [PATCH 2/2] sound: mixart, fix lock imbalance Jiri Slaby
2009-03-12  7:28 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h1vt32o94.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®