Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp417759ima; Wed, 6 Feb 2019 02:14:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IYdpU2ppo8zQT4vuJ3+FKVHprtQH0QiOnO8fpbraBpGOXnCggO73Q94kuLF6KnAq7F2yNM9 X-Received: by 2002:a62:2781:: with SMTP id n123mr9874728pfn.138.1549448043336; Wed, 06 Feb 2019 02:14:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549448043; cv=none; d=google.com; s=arc-20160816; b=eNKAUjQlbUAg33la7CrrBOTgZdO/XdWEAfwOCnbYoBoLAPrYbX0RE5tAeHJ88YUqO+ 4dsUqGdlyn4meIw+oqtHbYR8nbeh75YNrMEmnsF900N2hDrO8Voe94xHwTpI5Ia3hRuP l5BdSc3Rnwc7Xp0s0fevQA5oygCj4sscp+g4ELUKxTcbaNpMYAtqwbWtoiyGh1Af7cPm zLcvn3ByKpGE2aAvDWYCtc7KvMqLNhnSV36o4PcpYQIu1fntbaKyJJK8Vb7QEdY/aN/m zA8QAgVB61CK1Mt6/SZ9rovXuBh5Z/+G2VL+nKg2jXji0+G/tI/QE0jInONwigPRiTr6 hemw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=l4PwiBMxIrie1Cq1bShiur3WqOctNu7Eowvhgerw9LQ=; b=yYbAuPOizZ40ltsCqQjo6xCk4diUxea0AHW9xGfWjdBGnrH8299TB826BbHg8qvLty qLaIYa+Jkvskps9yNnS+aTAJH40eiO5jnajWQ8n0Q+G/GgYpquVfQEhGJDM1JWC77WYp 6KrHaXxsQTau4lHCGU17YKErAYNRReCD5XSWVjZmuwumnwBzuL4hLj9uFvb8hiNqsAFl Rhc/H6mEx3AMvN3BesP7Ers74GjzZFiTKC52lLpZAncxb+TU5tBXYpSh9CGIaizF8dGy f2IkGjHtleteF/I67bUoco596aPPKjkw9GfbBXEEN/XwxwwPHMTkK+CsEBRTB0gio59r Gplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=h4zeheek; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b29si3201472pgm.31.2019.02.06.02.13.47; Wed, 06 Feb 2019 02:14:03 -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=@samsung.com header.s=mail20170921 header.b=h4zeheek; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728338AbfBFKLN (ORCPT + 99 others); Wed, 6 Feb 2019 05:11:13 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:29630 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbfBFKLN (ORCPT ); Wed, 6 Feb 2019 05:11:13 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190206101109epoutp03efeab2665fe633891f32d2d88387fb45~AvqCx-5op1312913129epoutp03_; Wed, 6 Feb 2019 10:11:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190206101109epoutp03efeab2665fe633891f32d2d88387fb45~AvqCx-5op1312913129epoutp03_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549447869; bh=l4PwiBMxIrie1Cq1bShiur3WqOctNu7Eowvhgerw9LQ=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=h4zeheekk7+seeqnqmuYjFfl3JZswl2gBCgN8HOuA8t+P5QUR1oDHrdd4q64c7Hwq gTSpZla5osx1lkjY7vbXGtw/ZOfC6TlAsOHyv7rjAytBHMwtXjSe09yom697ywNuaI 8sB874xSL96ZUuIMZBnjLOgjdsTsABuhF9M+xi0k= Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190206101108epcas1p113f50fb5cb6d4e437abd0220e2727f36~AvqChhIAy2808728087epcas1p1h; Wed, 6 Feb 2019 10:11:08 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id E9.7C.04074.CB2BA5C5; Wed, 6 Feb 2019 19:11:08 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190206101108epcas1p3bd1f069716d666e10b2019692cb97df0~AvqB9n4J-2500225002epcas1p32; Wed, 6 Feb 2019 10:11:08 +0000 (GMT) X-AuditID: b6c32a35-27fff70000000fea-97-5c5ab2bcb889 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F9.69.04015.CB2BA5C5; Wed, 6 Feb 2019 19:11:08 +0900 (KST) Received: from [106.116.147.40] by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PMI00IMY1MF0PB0@mmp2.samsung.com>; Wed, 06 Feb 2019 19:11:08 +0900 (KST) Subject: Re: [BUG BISECT] NULL pointer after commit "ASoC: dapm: Only power up active channels from a DAI" To: Krzysztof Kozlowski , linux-kernel@vger.kernel.org, ckeepax@opensource.cirrus.com Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Marek Szyprowski From: Sylwester Nawrocki Message-id: <5f4f2221-f11f-98c8-fadc-e713f4623246@samsung.com> Date: Wed, 06 Feb 2019 11:11:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-version: 1.0 In-reply-to: <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> Content-type: text/plain; charset="utf-8" Content-language: en-GB Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBKsWRmVeSWpSXmKPExsWy7bCmru6eTVExBvPumVhcuXiIyWLqwyds FldaNzFanD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWnbv6WS02fF/L6MDlseFzE5vHzll3 2T02repk85g+5z+jx763y9g8+rasYvRYv+Uqi8fnTXIBHFFcNimpOZllqUX6dglcGY8XaRQs Eqy4dLeVuYHxDm8XIyeHhICJxM/tL1lAbCGBHYwSS9bzdTFyAdnfGSVO3/wClOAAK3pyNAgi voFRomflL3YI5z6jxKNV/WDdwgI5EsenXACzRQQyJA4c+csKUsQs8IdR4vXRRcwgCTYBQ4ne o32MIDavgJ3EmtMTmEBsFgFViU1LZ7CC2KICERKHe99B1QhK/Jh8D2wop4C9xP32u+wgNrOA psSLL5NYIGxxiWP3bzJC2PISm9e8ZQZZLCHwn01i/rKz7BB/uki8vbOTDeIdaYlLR20hwtUS u7Z3Q9V3MEq0XNjODJGwljh8/CIrxFA+iXdfe1ghenklOtqEIEo8JPoWt7FAQmIbo8S/51tZ JjDKzEJy9ywkt85CcussJLcuYGRZxSiWWlCcm55abFhgqFecmFtcmpeul5yfu4kRnF60THcw Tjnnc4hRgINRiYdXozsyRog1say4MvcQowQHs5IIr/mMqBgh3pTEyqrUovz4otKc1OJDjNIc LEriv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S-MailID: 20190206101108epcas1p3bd1f069716d666e10b2019692cb97df0 CMS-TYPE: 101P X-CMS-RootMailID: 20190205211638epcas3p409823d4acac8073473153d745151ea5f References: <20190205211622.GA5891@kozik-lap> <844c3f34-f7db-6b26-169a-994922367c78@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/6/19 10:46, Sylwester Nawrocki wrote: > On 2/5/19 22:16, Krzysztof Kozlowski wrote: >> Bisect pointed to commit: >> commit 078a85f2806f0ffd11289009462a6a390f9adb5c >> Author: Charles Keepax >> Date: Thu Jan 31 13:30:18 2019 +0000 >> ASoC: dapm: Only power up active channels from a DAI >> >> as a bad commit for NULL pointer on my Odroid XU3 and Odroid U3 board when >> doing "aplay /usr/share/sounds/alsa/Front_Right.wav". >> >> 1. Arch ARM Linux >> 2. exynos_defconfig >> 3. Odroid U3, XU3, Exynos SoC, ARMv7 >> >> Last address is in calltrace: >> c079552c >> dapm_update_dai_unlocked >> sound/soc/soc-dapm.c:2586 > > Thanks for bisecting this, I ran into same issue last night and I'm starting > to debug this now. I have added some debug prints and it looks like it oopses > on NULL playback_widget of the dummy DAI. > > [ 30.701182] hdmi-audio-codec hdmi-audio-codec.0.auto: Update DAI routes for i2s-hifi playback > [ 30.709630] dapm_update_dai_unlocked:2586 w=8bd27d28 > [ 30.714403] dapm_update_dai_unlocked:2594 w=8bd27d28 > [ 30.724688] max98090 5-0010: Update DAI routes for HiFi playback > [ 30.730163] dapm_update_dai_unlocked:2586 w=3fc942af > [ 30.735154] dapm_update_dai_unlocked:2594 w=3fc942af > [ 30.745051] snd-soc-dummy snd-soc-dummy: Update DAI routes for snd-soc-dummy-dai playback > [ 30.753128] dapm_update_dai_unlocked:2586 w= (null) > [ 30.758114] Unable to handle kernel NULL pointer dereference at virtual address 0000007c With a change as below there is no oops and everything works again, but I'm not sure this is a proper fix. diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5b74dffc9c11..111a23a9708a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2580,6 +2580,9 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream, else w = dai->capture_widget; + if (!w) + return 0; + dev_dbg(dai->dev, "Update DAI routes for %s %s\n", dai->name, dir == SNDRV_PCM_STREAM_PLAYBACK ? "playback" : "capture"); -- Thanks, Sylwester