Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp425928imu; Mon, 5 Nov 2018 03:14:25 -0800 (PST) X-Google-Smtp-Source: AJdET5cathobjVSztBTiEsnGkAJKRi4F8vAG83XB3e933KTyFVRsTP5cgTqFzSYSkGAfQlqQwlaT X-Received: by 2002:a63:78cd:: with SMTP id t196mr17218402pgc.62.1541416465929; Mon, 05 Nov 2018 03:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541416465; cv=none; d=google.com; s=arc-20160816; b=rZCIjoZGY+TV4DDDUt26IQeqjIGHNHZA3E24u7mIwOUfZc9yk7QNXDkKkrO6/PIR7Z z37+b9HDTAMsZhfmIiwM4g+rguuKza1zws2ukrWrM54LN5lBPvCEJzhQw9hdRPg9ckgo fOBuFx+DApCuhLh9LmpN4fMA3L0AZMcbqa6wJVIcsZ6JqVXeyD6Op/kLRKHJ46PyKRUY kXJu7ZNU5r17HDmejwx+AZ2Ww7tRh4C7mdaTeShXthpcybBvkU+caCkCCRmhSJt33VMu kiSgk19SQvtP/ymdL9ebqrkD+xfCS1CfG/jo21N7HXbZjcXcDeJYj4PMFi5VQuEd3H6X sAEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=mrWvm6nTrJASYcLMhSsb8fP2jbRt3Pshl00AN+mott4=; b=i+8EjzInef1IFA+eh9yAD8p1AqweQdo508+MBJksz2Ven3ioXx9iBVMmA/b9NvKLBe vLYDITPoqh+MVs4i73k0wNIAOfUO108PxZqp6vM24ICg+tbtUfBd0LuRLsY73di/KV/H 77NwF6VmK91gZU6le6SdC+qCg32Yt+EqGuQbJxzSeHYpXO9aVehZ7D+91pPKyN6qVDRy aGsD6rI6UDM1pB4zgJBlM6GDG2WZVT58DAsbKBGfaMrwoDIpk4EPKbFsF5UNDnAv4riS 3Ir5oqxUuugYUINVWfgOfZcef6t4jc5DaBpZOuS7YGIKy4VGhF/YmoNdI9R1XX9naq89 rASg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a195-v6si17970603pfa.214.2018.11.05.03.14.10; Mon, 05 Nov 2018 03:14:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729290AbeKEUcw (ORCPT + 99 others); Mon, 5 Nov 2018 15:32:52 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:14683 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbeKEUcv (ORCPT ); Mon, 5 Nov 2018 15:32:51 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id wA5B8WZD022344; Mon, 5 Nov 2018 12:13:24 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2nh2119jpr-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 05 Nov 2018 12:13:24 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C80D938; Mon, 5 Nov 2018 11:13:21 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6094127E4; Mon, 5 Nov 2018 11:13:21 +0000 (GMT) Received: from [10.201.23.162] (10.75.127.46) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 5 Nov 2018 12:13:20 +0100 Subject: Re: [alsa-devel] [PATCH] ASoC: core: Invoke pcm_new() for all DAI-link To: Rohit Kumar , Takashi Iwai , CC: , , , , , , , , References: <1541075929-29323-1-git-send-email-rohitkr@codeaurora.org> <48c78f67-8178-2d07-e35d-2e4eca51ccbc@codeaurora.org> From: Arnaud Pouliquen Openpgp: preference=signencrypt Autocrypt: addr=arnaud.pouliquen@st.com; prefer-encrypt=mutual; keydata= xsFNBFZu+HIBEAC/bt4pnj18oKkUw40q1IXSPeDFOuuznWgFbjFS6Mrb8axwtnxeYicv0WAL rWhlhQ6W2TfKDJtkDygkfaZw7Nlsj57zXrzjVXuy4Vkezxtg7kvSLYItQAE8YFSOrBTL58Yd d5cAFz/9WbWGRf0o9MxFavvGQ9zkfHVd+Ytw6dJNP4DUys9260BoxKZZMaevxobh5Hnram6M gVBYGMuJf5tmkXD/FhxjWEZ5q8pCfqZTlN9IZn7S8d0tyFL7+nkeYldA2DdVplfXXieEEURQ aBjcZ7ZTrzu1X/1RrH1tIQE7dclxk5pr2xY8osNePmxSoi+4DJzpZeQ32U4wAyZ8Hs0i50rS VxZuT2xW7tlNcw147w+kR9+xugXrECo0v1uX7/ysgFnZ/YasN8E+osM2sfa7OYUloVX5KeUK yT58KAVkjUfo0OdtSmGkEkILWQLACFEFVJPz7/I8PisoqzLS4Jb8aXbrwgIg7d4NDgW2FddV X9jd1odJK5N68SZqRF+I8ndttRGK0o7NZHH4hxJg9jvyEELdgQAmjR9Vf0eZGNfowLCnVcLq s+8q3nQ1RrW5cRBgB8YT2kC8wwY5as8fhfp4846pe2b8Akh0+Vba5pXaTvtmdOMRrc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F1e3L/IMZZMquggEsixD8CYMOzahCEZ7UUwD5LKxRfmBWBgK 36tfTyducLyZtGB3mbJYfWeI7aiFgYsd5ehov6OIBlOz5iOshd97+wbbmziYEp6jWMIMX+Em zqSvS5ETZydayO5JBbw7fFBd1nGVYk1WL6Ll72g+iEnqgIckMtxey1TgfT7GhPkR7hl54ZAe 8mOik8I/F6EW8XyQAA2P Message-ID: <791d4587-4db3-3ffa-331a-f79d0993ca8c@st.com> Date: Mon, 5 Nov 2018 12:13:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <48c78f67-8178-2d07-e35d-2e4eca51ccbc@codeaurora.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-05_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Rohit, On 11/2/18 1:06 PM, Rohit Kumar wrote: > > On 11/2/2018 1:12 PM, Takashi Iwai wrote: >> On Thu, 01 Nov 2018 13:38:49 +0100, >> Rohit kumar wrote: >>> Remove no_pcm check to invoke pcm_new() for backend dai-links >>> too. This fixes crash in hdmi codec driver during hdmi_codec_startup() >>> while accessing chmap_info struct. chmap_info struct memory is >>> allocated in pcm_new() of hdmi codec driver which is not invoked >>> in case of DPCM when hdmi codec driver is part of backend dai-link. >>> >>> Below is the crash stack: >>> >>> [   61.635493] Unable to handle kernel NULL pointer dereference at >>> virtual address 00000018 >>> .. >>> [   61.666696]   CM = 0, WnR = 1 >>> [   61.669778] user pgtable: 4k pages, 39-bit VAs, pgd = >>> ffffffc0d6633000 >>> [   61.676526] [0000000000000018] *pgd=0000000153fc8003, >>> *pud=0000000153fc8003, *pmd=0000000000000000 >>> [   61.685793] Internal error: Oops: 96000046 [#1] PREEMPT SMP >>> [   61.722955] CPU: 7 PID: 2238 Comm: aplay Not tainted 4.14.72 #21 >>> .. >>> [   61.740269] PC is at hdmi_codec_startup+0x124/0x164 >>> [   61.745308] LR is at hdmi_codec_startup+0xe4/0x164 >>> >>> Signed-off-by: Rohit kumar >> Did you check whether all drivers have no side-effect by this change? >> The hdmi-codec isn't the only driver that has pcm_new ops, so we have >> to make sure that such a fundamental change wouldn't bring any >> regressions. >> > Below are the drivers calling pcm_new() other than hdmi codec driver. > sound/soc/meson/axg-frddr.c > sound/soc/meson/axg-toddr.c > These two drivers are frontend DAI drivers and should not be impacted > because of this. > > Other than this, pcm_new() is called from sound/soc/stm/stm32_sai_sub.c > I could not get much info about this driver. However, it is just adding > kcontrols in pcm_new() which uses internal private structs in get()/put(). > Olivier Moysan can too confirm on this. First, i'm answering for Olivier: no regression identified for the SAI driver, it is not a DPCM driver. Then i have a concern about the call of pcm_new for a no-PCM backend. Does it make sense? In DPCM concept, the backend is not linked to the PCM device... Instead, I would suggest that you add protection in HDMI_codec on chmap_info pointer. The drawback would be that the control is no more available...do you need it? Regards Arnaud > > Thanks, > Rohit >> thanks, >> >> Takashi >