linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Ricardo Ribalda <ribalda@chromium.org>, Oliver Neukum <oneukum@suse.com>
Cc: Juergen Gross <jgross@suse.com>, Mark Brown <broonie@kernel.org>,
	Chromeos Kdump <chromeos-kdump@google.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Len Brown <len.brown@intel.com>, Ard Biesheuvel <ardb@kernel.org>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Eric Biederman <ebiederm@xmission.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Joel Fernandes <joel@joelfernandes.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Pavel Machek <pavel@ucw.cz>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Ingo Molnar <mingo@redhat.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Dexuan Cui <decui@microsoft.com>, Takashi Iwai <tiwai@suse.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, kexec@lists.infradead.org,
	alsa-devel@alsa-project.org, stable@vger.kernel.org,
	sound-open-firmware@alsa-project.org,
	linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v8 3/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace
Date: Thu, 1 Dec 2022 14:22:12 +0100	[thread overview]
Message-ID: <d3730d1d-6f92-700a-06c4-0e0a35e270b0@suse.com> (raw)
In-Reply-To: <CANiDSCtwSb50sjn5tM7jJ6W2UpeKzpuzng+RdJuywiC3-j2zdg@mail.gmail.com>

On 01.12.22 14:03, Ricardo Ribalda wrote:

Hi,
  
> This patchset does not modify this behaviour. It simply fixes the
> stall for kexec().
> 
> The  patch that introduced the stall:
> 83bfc7e793b5 ("ASoC: SOF: core: unregister clients and machine drivers
> in .shutdown")

That patch is problematic. I would go as far as saying that
it needs to be reverted.

> was sent as a generalised version of:
> https://github.com/thesofproject/linux/pull/3388
> 
> AFAIK, we would need a similar patch for every single board.... which
> I am not sure it is doable in a reasonable timeframe.
> 
> On the meantime this seems like a decent compromises. Yes, a
> miss-behaving userspace can still stall during suspend, but that was
> not introduced in this patch.

Well, I mean if you know what wrong then I'd say at least return to
a sanely broken state.

The whole approach is wrong. You need to be able to deal with user
space talking to removed devices by returning an error and keeping
the resources association with the open file allocated until
user space calls close()

	Regards
		Oliver




  reply	other threads:[~2022-12-01 13:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 11:08 [PATCH v8 0/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace Ricardo Ribalda
2022-12-01 11:08 ` [PATCH v8 1/3] kexec: Refactor kexec_in_progress into a function Ricardo Ribalda
2022-12-01 11:08 ` [PATCH v8 2/3] freezer: refactor pm_freezing " Ricardo Ribalda
2022-12-02 17:47   ` Rafael J. Wysocki
2022-12-05 12:05     ` Ricardo Ribalda
2022-12-01 11:08 ` [PATCH v8 3/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace Ricardo Ribalda
2022-12-01 12:28   ` Oliver Neukum
2022-12-01 13:03     ` Ricardo Ribalda
2022-12-01 13:22       ` Oliver Neukum [this message]
2022-12-01 13:34         ` Ricardo Ribalda
2022-12-09 11:53           ` Kai Vehmanen
2022-12-01 13:38         ` Takashi Iwai

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=d3730d1d-6f92-700a-06c4-0e0a35e270b0@suse.com \
    --to=oneukum@suse.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ardb@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=chromeos-kdump@google.com \
    --cc=daniel.baluta@nxp.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=ebiederm@xmission.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=joel@joelfernandes.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=kys@microsoft.com \
    --cc=len.brown@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=ribalda@chromium.org \
    --cc=rostedt@goodmis.org \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=wei.liu@kernel.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yung-chuan.liao@linux.intel.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;
as well as URLs for NNTP newsgroup(s).