Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp456738ima; Wed, 6 Feb 2019 03:02:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IaIrMX9G1W6ZNqV0YQ9g7UVJKxsrvEUP5vjFA1AxcKrz4EUPzqMbRPog6X02Caa8udkOnx5 X-Received: by 2002:a65:5c4b:: with SMTP id v11mr8997485pgr.333.1549450925445; Wed, 06 Feb 2019 03:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549450925; cv=none; d=google.com; s=arc-20160816; b=BB6GDcP1mtldDxUQAjV9jpObIA73FD3JG2JnIjaGm2o5iubDZ3wxrlsRaa4yM6KHcZ bQ35dxlT/RnDMasmup5wzMzWUdY317U6WPNDkKa9vbsklCq0XjagSFUvqvQefS+WTQte U9wGrdpm080MPc9z2MxRzBZh9V+vt1iFFC/GsdILtnQZWBYE53yFX2j/K3H9tP1kKYdw 94HQ5dBMTsVmKfyDY6FEl47hSOdhkMPJPsHId1IrYWegJZtX2VvaQLgsFsRXYEa65hAE NL3BUrkOJJDn7uMo9PscgGLoijyJ93sSswmua/eZhc5fmEcaTgjzZIheLkBFnQMhrhbr I3Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ymY8pYmDQXbH3NvJLyYdO9LbjoGg6FLhOmXioZ6txtg=; b=IlkKanpGUVmO5jtLuQgfwS5Y3Vsj/OaNRh1NfMUklIiuOcbz3jRE+HnVw7Vy+l+eiP 8NZPQWsvX6KIL1H296chgNgERid64xFxPiIqgaY++UgvKijbeCQ8jBU1PFrCgnkOnU5k 751t97BCYSz+Ln5YVIJna3d7N+CRduzCF9ICT0tMoCctayy7UajNIQl86eXShwYp6wc5 wKweJzgC1ANEa3aSUf6fodz8G8kGXC7oDfGNKsFrtHYymFr/RN7RHNTPVy5PLmvvM7HS wbmuak9+SnFuCqEeBwJD6E+QNeMZYAZrDONyvkJFElIwT50Jltap3ufraR4HCxvT9wBW IP+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n32si5441421pgm.439.2019.02.06.03.01.49; Wed, 06 Feb 2019 03:02:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728769AbfBFLBG (ORCPT + 99 others); Wed, 6 Feb 2019 06:01:06 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:34182 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726159AbfBFLBF (ORCPT ); Wed, 6 Feb 2019 06:01:05 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x16AsbCn005654; Wed, 6 Feb 2019 04:59:57 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail4.cirrus.com ([87.246.98.35]) by mx0b-001ae601.pphosted.com with ESMTP id 2qfp68rmxg-1; Wed, 06 Feb 2019 04:59:57 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail4.cirrus.com (Postfix) with ESMTP id ED6D8611C8B3; Wed, 6 Feb 2019 05:00:20 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Wed, 6 Feb 2019 10:59:56 +0000 Received: from imbe.wolfsonmicro.main (imbe.wolfsonmicro.main [198.61.95.81]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id x16AxtVa016379; Wed, 6 Feb 2019 10:59:55 GMT Date: Wed, 6 Feb 2019 10:59:55 +0000 From: Charles Keepax To: Krzysztof Kozlowski CC: Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , , , "linux-samsung-soc@vger.kernel.org" , Marek Szyprowski Subject: Re: [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked Message-ID: <20190206105955.GP3837@imbe.wolfsonmicro.main> References: <20190205211622.GA5891@kozik-lap> <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> <20190206100549.GO3837@imbe.wolfsonmicro.main> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=890 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902060087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > [ 64.307534] the existing dependency chain (in reverse order) is: > [ 64.314985] > [ 64.314985] -> #1 (&(&pri_dai->spinlock)->rlock){....}: > [ 64.321667] clk_mux_set_parent+0x34/0xb8 > [ 64.326162] clk_core_set_parent_nolock+0x21c/0x54c > [ 64.331535] clk_set_parent+0x38/0x6c > [ 64.335696] of_clk_set_defaults+0x11c/0x384 > [ 64.340460] of_clk_add_provider+0x8c/0xc8 > [ 64.345054] samsung_i2s_probe+0x484/0x64c > [ 64.349651] platform_drv_probe+0x6c/0xa4 > [ 64.354153] really_probe+0x280/0x414 > [ 64.358311] driver_probe_device+0x78/0x1c4 > [ 64.362991] bus_for_each_drv+0x74/0xb8 > [ 64.367323] __device_attach+0xd4/0x16c > [ 64.371655] bus_probe_device+0x88/0x90 > [ 64.375988] deferred_probe_work_func+0x4c/0xd0 > [ 64.381017] process_one_work+0x228/0x810 > [ 64.385520] worker_thread+0x30/0x570 > [ 64.389681] kthread+0x134/0x164 > [ 64.393405] ret_from_fork+0x14/0x20 > [ 64.397477] (null) > [ 64.400249] > [ 64.400249] -> #0 (prepare_lock){+.+.}: > [ 64.405539] __mutex_lock+0x7c/0xa98 > [ 64.409610] mutex_lock_nested+0x1c/0x24 > [ 64.414029] clk_prepare_lock+0x50/0xf8 > [ 64.418362] clk_core_get_rate+0xc/0x60 > [ 64.422695] i2s_trigger+0x444/0x6c8 > [ 64.426768] soc_pcm_trigger+0x100/0x140 > [ 64.431188] snd_pcm_action_single+0x38/0x80 > [ 64.435953] snd_pcm_action+0x54/0x5c > [ 64.440112] snd_pcm_action_lock_irq+0x28/0x3c > [ 64.445052] snd_pcm_ioctl+0x920/0x123c > [ 64.449386] do_vfs_ioctl+0xb0/0x9f8 > [ 64.453457] ksys_ioctl+0x34/0x5c > [ 64.457269] ret_fast_syscall+0x0/0x28 > [ 64.461516] 0xbe8db8ec Thanks, Charles