Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp471548ima; Wed, 6 Feb 2019 03:16:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IZwNGzb97RCyfYSOJfIq+D8pIbT6o2KYwyQF6gWASpxTZlGvNau48eXMx4Oe5JnuLJYecUY X-Received: by 2002:a62:9fcf:: with SMTP id v76mr9886950pfk.144.1549451770056; Wed, 06 Feb 2019 03:16:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549451770; cv=none; d=google.com; s=arc-20160816; b=N55376ZW5bH+vnzTBLMEWccsIRwC/yRsd7APrDbT67zZTXumSXD/4Tncv1s6FNeqdL 9dqO2b9LYRe1NmRJpN/BUB60CkwYjfCB2CMFYaHCOB6coUrUwwO7axSql9S8VpbouOEG dTqk2BTkYz2UwUJWvmD1JT2uFPK9b1NwyU5SmufLqAJRHMhlcfnfrWXVDC2aBQSQJ6+V wG0r8/JFF6rbooHgT2FTkG3cQpiLuW7Xm2H9wVJR/AihUCd/xGdYrp8x7vEBbi4yPFVd voexCHxieJ7USebutDzdmQGQzSJ2OP9iGhMz5x/3F0SBGvAOY+B/gfKbb3dA0ntT/L97 vWjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=djSnQYByPi8JmQwFvl4V6RcL4yq5UrU913R8sHvA9Ac=; b=z9Qk/BN6S9jDUqO2AoxdXk5vpDvC01Pyli1vm7ejWXjeyeZ/3HK9LI/FuHEV5Xf9IK +2+XJejKBvhUID6FJ6SeUEoByZVhloJ09PqjpGRKSxabteUp+D/pwXIzTJSr4gv5KM8P ZusKn07s/jELnyHoWPAhFmVIBUt7t0FzRHX9XpH9Z5erSbIhhYZA+7vchl+14udAaWy+ 2RR0Xl1jAXrK+OQnGtbIYzm/MPGNUlKUX387wrdWRkB5x+j/wgkOPsbfIZMRluL3uM7t ZXICoZqrJ2XdqgVGbRno1oiGdrHx4jlp1TqkssuofowPtd6jOJ/jn/Wm3M1KjCWqx083 kuWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e7AVy+uJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13si5518469pgj.157.2019.02.06.03.15.53; Wed, 06 Feb 2019 03:16:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e7AVy+uJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729604AbfBFLPL (ORCPT + 99 others); Wed, 6 Feb 2019 06:15:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:47092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbfBFLPK (ORCPT ); Wed, 6 Feb 2019 06:15:10 -0500 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31C22218AD; Wed, 6 Feb 2019 11:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549451709; bh=Z5R2qJFnEXEwqcHmT3jaena56ZwfcpxWBptoLFDd3XQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=e7AVy+uJM+0ctg5+IFRxh1O/6xQVlNKQbWPQTZ0EZdg2PS7CzyB/6SEuhZLReaQE6 1PfDSRviGd7tw9lCHC8RF8y/GPzjFoOTFF9ZontuKrUMjlmLS54JVzcIJeCZW/1aDb osUOLQ7UAMDCgG+Wzy7vaZ+mhP+S/rZW+5XzRy+c= Received: by mail-lj1-f178.google.com with SMTP id v14-v6so2872365ljv.1; Wed, 06 Feb 2019 03:15:09 -0800 (PST) X-Gm-Message-State: AHQUAuYnjL9pphJiO5x516IBJFhUCGkF3rD8zrwAVSnARw7YV0/ciAHb F7cMzhooBS9L40Oc44Ql15ucPFLIj4tspfmoaxU= X-Received: by 2002:a2e:81da:: with SMTP id s26-v6mr6079294ljg.183.1549451707342; Wed, 06 Feb 2019 03:15:07 -0800 (PST) MIME-Version: 1.0 References: <20190205211622.GA5891@kozik-lap> <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> <20190206100549.GO3837@imbe.wolfsonmicro.main> <20190206105955.GP3837@imbe.wolfsonmicro.main> In-Reply-To: <20190206105955.GP3837@imbe.wolfsonmicro.main> From: Krzysztof Kozlowski Date: Wed, 6 Feb 2019 12:14:56 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked To: Charles Keepax Cc: Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Feb 2019 at 12:00, Charles Keepax wrote: > > On Wed, Feb 06, 2019 at 11:22:33AM +0100, Krzysztof Kozlowski wrote: > > On Wed, 6 Feb 2019 at 11:05, Charles Keepax > > wrote: > > > > > > DAIs linked to the dummy will not have an associated playback/capture > > > widget, so we need to skip the update in that case. > > > > > > Fixes: 078a85f2806f ("ASoC: dapm: Only power up active channels from a DAI") > > > Signed-off-by: Charles Keepax > > > --- > > > > > > Ok so that all makes sense, this patch is probably the best fix? > > > > > > Thanks, > > > Charles > > > > For this particular issue (NULL-pointer): > > Reported-by: Krzysztof Kozlowski > > Tested-by: Krzysztof Kozlowski > > > > However now I see bug sleeping in atomic context: > > > > [ 64.000828] BUG: sleeping function called from invalid context at > > ../kernel/locking/mutex.c:908 > > Does this probably definitely get fixed by reverting my patch? > It's just a bit odd as this seems to be complaining about a clock > operation in i2s_trigger and I don't think my patch should have > any affect on the trigger callback. It should get run from either > the dai_link DAPM event or hw_params, neither of which should > happen in an atomic context. Before this fixup, probably NULL pointer happened before any of this. I tried it now few times and the possible deadlock and sleeping in invalid context did not appear. It might be random/racy or totally unrelated to your change. Best regards, Krzysztof