Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp584399rwb; Thu, 1 Dec 2022 06:05:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6H8HG3sd7D7N3uQtmr6EPUtlgJ3uQmbRtHjHQRV07dpUA/MI9wqHzr91pIVMT+sIlVBwNY X-Received: by 2002:a65:5a88:0:b0:477:78d0:edb1 with SMTP id c8-20020a655a88000000b0047778d0edb1mr42060415pgt.587.1669903553706; Thu, 01 Dec 2022 06:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669903553; cv=none; d=google.com; s=arc-20160816; b=o+CMyHnxFvnWqnGVWR79Zqr3egVydjVV60taF18nalpEecg6MmUeETr+f4X6e64/gx KjnFwELr6hjfSal1ww6bvZmPi2QVNsiZgRbvoO+Lw5MdFCahPmS1y6XD23xKjGLsOUEq h2/ZVAYfaupPBNc1Mu5QA7pjmVmL6vijGGeAXDXz7F6ZWUzUZVmm1IYqGVJUs8bv1DFG MQRMAYruFc0nM1Svqw6GFv/ur3fFsfsTEREoBe2fWrXUgd1Vf5SbGOLCO3hwkW0WeCS1 odINtUGUMAir80EtFnSzZphELY3qlV8QjTgAY0VfUWsXP3RnO6XNZsZeIzL0IiM80CAY UAsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tKguKo1XmUP31FlNvdaT70p0o/lwuxyZc7lK6ytX1QU=; b=Cuee80KlCurUMzybCLfm0mvV6Hsg5rjSjCM9UYbz4024D/MM74cMPzH7Xq/flaSiw+ eA6fHv4j42l5phnh5gVMO7Vdxt1Z0VrZ+aOpZSpdz3V1D6/FW18E4n6V6rfD+PYQan/1 7R/X2ddUyT7bMMbRQFQ9KRsjLCzRO67IZxMpchom8Rsqxkql1SL3Xwz8aXSxgx3v8AQG kj4iCNl6qxo145M8D62xemaNNKx4lYF+fDxjxg61S/3nYUpfofpooc/cdHGNSH27fbap +F1kLZGZBJ5o9ITtDgyOnW6E4Jpqau6DcSzPyFDpfyF4YCnV9N/LaIx6MLqSZopX9EOr n9Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=exIoeOCr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a170902f64d00b00186a4763532si4503769plg.28.2022.12.01.06.05.38; Thu, 01 Dec 2022 06:05:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=exIoeOCr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbiLANev (ORCPT + 82 others); Thu, 1 Dec 2022 08:34:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbiLANeo (ORCPT ); Thu, 1 Dec 2022 08:34:44 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EABC7717 for ; Thu, 1 Dec 2022 05:34:43 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id w15-20020a17090a380f00b0021873113cb4so2084356pjb.0 for ; Thu, 01 Dec 2022 05:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tKguKo1XmUP31FlNvdaT70p0o/lwuxyZc7lK6ytX1QU=; b=exIoeOCrlPb+Uw2FGLRsALkrLYWj9cDaTvcr81Evjsi5DXIR/uPZJTWsXlu/PiLLI3 HTBr5t4pzsWnn6M0lC4H5pNT0n3aLXEpcSRixu/mfsu8XeXoSArYBYlbqRz6mRys5h3T IyXf+jqyVq8u6L+O/LqO4biBjWXlb+7RKXSc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tKguKo1XmUP31FlNvdaT70p0o/lwuxyZc7lK6ytX1QU=; b=VHWa5T0EdLbdOSlQIOjCnSX4YKqwGxDgeiB5Ny/za6XMDENCyrOo8NfO3dK+HYHJz3 zRtfjsS1zOI9daYGSdgA4YzQ4Grjx52zuGhSN0O8zS0objzNX8GJxLCiIRSmhIIOd7Rh o/OFaMoxa4O0AtD1SWD6NX4QBbdR3iKIQObDrIGkLPhmpcPcCHIb/jrSR9/SOpH1NYyi cxDwhA5XHfDmCgY8eatvAxXCldSS1CChB0hScYM2tsPzmfRdfSnXWK5cKBAQO5iWaEbt 45ylOvM7OvGkgCUCxmyz9zn37f09ViE23L3+enrEX4HN2+ouCiXtZiTHPE2ZLufHfWfE tzLg== X-Gm-Message-State: ANoB5pngBh6Q6zO3rsikAmeb7DioV4I5SYsQ4jGvstfvd+mH5T9XRnkG QGTsKZWtkiUDptMPG4FlP22GBCZCghjKHLqRwwY= X-Received: by 2002:a17:90b:4fc3:b0:219:6224:dffb with SMTP id qa3-20020a17090b4fc300b002196224dffbmr8888717pjb.19.1669901683235; Thu, 01 Dec 2022 05:34:43 -0800 (PST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com. [209.85.215.169]) by smtp.gmail.com with ESMTPSA id x17-20020aa79411000000b00572c12a1e91sm3261072pfo.48.2022.12.01.05.34.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Dec 2022 05:34:40 -0800 (PST) Received: by mail-pg1-f169.google.com with SMTP id 6so1680802pgm.6 for ; Thu, 01 Dec 2022 05:34:39 -0800 (PST) X-Received: by 2002:a92:ca89:0:b0:302:385e:eeb4 with SMTP id t9-20020a92ca89000000b00302385eeeb4mr24829482ilo.66.1669901667796; Thu, 01 Dec 2022 05:34:27 -0800 (PST) MIME-Version: 1.0 References: <20221127-snd-freeze-v8-0-3bc02d09f2ce@chromium.org> <20221127-snd-freeze-v8-3-3bc02d09f2ce@chromium.org> <716e5175-7a44-7ae8-b6bb-10d9807552e6@suse.com> In-Reply-To: From: Ricardo Ribalda Date: Thu, 1 Dec 2022 14:34:16 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 3/3] ASoC: SOF: Fix deadlock when shutdown a frozen userspace To: Oliver Neukum Cc: Juergen Gross , Mark Brown , Chromeos Kdump , Daniel Baluta , Christophe Leroy , Len Brown , Ard Biesheuvel , Ranjani Sridharan , "Rafael J. Wysocki" , Boris Ostrovsky , Nicholas Piggin , Michael Ellerman , Eric Biederman , Dave Hansen , Jaroslav Kysela , Joel Fernandes , Liam Girdwood , Peter Ujfalusi , Pavel Machek , Pierre-Louis Bossart , Kai Vehmanen , Steven Rostedt , "K. Y. Srinivasan" , Ingo Molnar , Bjorn Helgaas , Dexuan Cui , Takashi Iwai , "H. Peter Anvin" , Bard Liao , Haiyang Zhang , Wei Liu , Thomas Gleixner , Borislav Petkov , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oliver On Thu, 1 Dec 2022 at 14:22, 'Oliver Neukum' via Chromeos Kdump wrote: > > 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. > It fixes a real issue. We have not had any complaints until we tried to kexec in the platform. I wont recommend reverting it until we have an alternative implementation. kexec is far less common than suspend/reboot. > > 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() In general, the whole shutdown is broken for all the subsystems ;). It is a complicated issue. Users handling fds, devices with DMAs in the middle of an operation, dma fences.... Unfortunately I am not that familiar with the sound subsystem to make a proper patch for this. > > Regards > Oliver > > > > -- > You received this message because you are subscribed to the Google Groups "Chromeos Kdump" group. > To unsubscribe from this group and stop receiving emails from it, send an email to chromeos-kdump+unsubscribe@google.com. > To view this discussion on the web, visit https://groups.google.com/a/google.com/d/msgid/chromeos-kdump/d3730d1d-6f92-700a-06c4-0e0a35e270b0%40suse.com. -- Ricardo Ribalda