Thread (12 messages) 12 messages, 5 authors, 2022-12-09

Re: [PATCH v8 3/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace

From: Ricardo Ribalda <hidden>
Date: 2022-12-01 13:05:28
Also in: alsa-devel, kexec, linux-efi, linux-hyperv, linux-pci, linux-pm, lkml, stable, xen-devel

Hi Oliver

Thanks for your review

On Thu, 1 Dec 2022 at 13:29, Oliver Neukum [off-list ref] wrote:
On 01.12.22 12:08, Ricardo Ribalda wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help