[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 3/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace
- To: Oliver Neukum <oneukum@xxxxxxxx>
- From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
- Date: Thu, 1 Dec 2022 14:03:54 +0100
- Cc: Juergen Gross <jgross@xxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Chromeos Kdump <chromeos-kdump@xxxxxxxxxx>, Daniel Baluta <daniel.baluta@xxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Len Brown <len.brown@xxxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>, Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, x86@xxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, sound-open-firmware@xxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 01 Dec 2022 13:12:35 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Oliver
Thanks for your review
On Thu, 1 Dec 2022 at 13:29, Oliver Neukum <oneukum@xxxxxxxx> wrote:
>
> On 01.12.22 12:08, Ricardo Ribalda wrote:
> > If we are shutting down due to kexec and the userspace is frozen, the
> > system will stall forever waiting for userspace to complete.
> >
> > Do not wait for the clients to complete in that case.
>
> Hi,
>
> I am afraid I have to state that this approach is bad in every case,
> not just this corner case. It basically means that user space can stall
> the kernel for an arbitrary amount of time. And we cannot have that.
>
> Regards
> Oliver
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")
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.
Regards!
>
--
Ricardo Ribalda
|