public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: <tiwai@suse.com>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH] ALSA: hda: hda_component: Fix mutex crash if nothing ever binds
Date: Mon, 26 Aug 2024 12:04:22 +0200	[thread overview]
Message-ID: <87frqriord.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240826094940.45563-1-rf@opensource.cirrus.com>

On Mon, 26 Aug 2024 11:49:40 +0200,
Richard Fitzgerald wrote:
> 
> Move the initialization of parent->mutex into
> hda_component_manager_init() so that it is always valid.
> 
> In hda_component_manager_bind() do not clear the parent information.
> Only zero-fill the per-component data ready for it to be filled in
> by the components as they bind.
> 
> Previously parent->mutex was being initialized only in
> hda_component_manager_bind(). This meant that it was only
> initialized if all components appeared and there was a bind callback.
> If there wasn't a bind the mutex object was not valid when the
> Realtek driver called any of the other functions.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Fixes: 047b9cbbaa8e ("ALSA: hda: hda_component: Protect shared data with a mutex")

Thanks, applied now to for-linus branch.


Takashi

      reply	other threads:[~2024-08-26 10:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  9:49 [PATCH] ALSA: hda: hda_component: Fix mutex crash if nothing ever binds Richard Fitzgerald
2024-08-26 10:04 ` 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=87frqriord.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /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