Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Erick Karanja <karanja99erick@gmail.com>, linux-sound@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v4] ALSA: usb-audio: qcom: Adjust mutex unlock order
Date: Mon, 21 Jul 2025 17:00:05 +0200	[thread overview]
Message-ID: <21c3aec1-0284-471f-b336-cdcc832ac6fe@web.de> (raw)
In-Reply-To: <20250721114554.1666104-1-karanja99erick@gmail.com>

> The mutexes qdev_mutex and chip->mutex are acquired in that order
> throughout the driver. To preserve proper lock hierarchy and avoid
> potential deadlocks, they must be released in the reverse
> order of acquisition.

Would you become interested to benefit any more from lock guards?
https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225

Regards,
Markus

  parent reply	other threads:[~2025-07-21 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 11:45 [PATCH v4] ALSA: usb-audio: qcom: Adjust mutex unlock order Erick Karanja
2025-07-21 14:06 ` Markus Elfring
2025-07-21 15:00 ` Markus Elfring [this message]
2025-07-22  9:38 ` Takashi Iwai
2025-07-22 19:22   ` Markus Elfring

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=21c3aec1-0284-471f-b336-cdcc832ac6fe@web.de \
    --to=markus.elfring@web.de \
    --cc=karanja99erick@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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