From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77C9FC433DF for ; Tue, 30 Jun 2020 12:36:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AA522073E for ; Tue, 30 Jun 2020 12:36:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dkU5o1DY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA522073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Date:To:From:Subject:Message-ID:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CGCKd3twudIOXT3+VMfd37jjN8VoAAiM3URTVIdvUbU=; b=dkU5o1DY5/BwldKMVqSINHjFP aGN32hSdzDpr4Uz2C04cVRUO9/sm8o3t3zy9P7zOVgkoxDX6+JbniUhIJU75izPx5ud5b6ct1P3L9 CxI83dUESAshnrbnguHkpJkwzCdBm4UiUIkFTlzjKLTFsp1FIqh5em9Un4Bw7HtKbnolFRFbWhLB8 AGQT+D91jB3fqoiCgV4InpMvYL9nMM5BtBHobmMF++VZ84iFKyk2mM+aR8t4ZLTcARiHYtep7nu+G xdEzaGvtM0bdoGLss71b+sr4SrHepxsD9SZi2fBWkrGfgFBcPvtlDHhKd0J3CxOCwemx7x8u7KLV7 Xyj5whePg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqFTJ-00061o-1y; Tue, 30 Jun 2020 12:34:45 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqFTF-000610-4B; Tue, 30 Jun 2020 12:34:42 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 31404AF24; Tue, 30 Jun 2020 12:34:40 +0000 (UTC) Message-ID: Subject: Re: [PATCH] ALSA: core: Warn on empty module From: Nicolas Saenz Julienne To: Marek Szyprowski , Takashi Iwai , linux-rpi-kernel , "linux-arm-kernel@lists.infradead.org" Date: Tue, 30 Jun 2020 14:34:39 +0200 In-Reply-To: <0ec9855e-18d5-6144-ae5f-6cb239214dee@samsung.com> References: <20200624160300.21703-1-tiwai@suse.de> <0ec9855e-18d5-6144-ae5f-6cb239214dee@samsung.com> User-Agent: Evolution 3.36.3 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Pierre-Louis Bossart Content-Type: multipart/mixed; boundary="===============2089132563793919657==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2089132563793919657== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-T29H5IrPZ4ZcZyWqZhnQ" --=-T29H5IrPZ4ZcZyWqZhnQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Marek, Thanks for pointing this out! On Tue, 2020-06-30 at 14:30 +0200, Marek Szyprowski wrote: > Hi >=20 > On 24.06.2020 18:03, Takashi Iwai wrote: > > The module argument passed to snd_card_new() must be a valid non-NULL > > pointer when the module support is enabled. Since ASoC driver passes > > the argument from each snd_soc_card definition, one may forget to set > > the owner field and lead to a NULL module easily. > >=20 > > For catching such an overlook, add a WARN_ON() in snd_card_new(). > > Also, put the card->module assignment in the ifdef block for a very > > minor optimization. > >=20 > > Signed-off-by: Takashi Iwai >=20 > I know that this is intended, but I would like to note that this patch= =20 > reveals the following issue on Raspberry Pi 3B with ARM 32bit kernel=20 > compiled from multi_v7_defconfig: >=20 > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 210 at sound/core/init.c:207=20 > snd_card_new+0x378/0x398 [snd] > Modules linked in: vc4(+) snd_soc_core ac97_bus snd_pcm_dmaengine=20 > bluetooth snd_pcm snd_timer crc32_arm_ce raspberrypi_hwmon snd soundcore= =20 > ecdh_generic ecc bcm2835_thermal phy_generic > CPU: 1 PID: 210 Comm: systemd-udevd Not tainted=20 > 5.8.0-rc1-00027-g81033c6b584b #1087 > Hardware name: BCM2835 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0xd4/0xe8) > [] (dump_stack) from [] (__warn+0xdc/0xf4) > [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) > [] (warn_slowpath_fmt) from []=20 > (snd_card_new+0x378/0x398 [snd]) > [] (snd_card_new [snd]) from []=20 > (snd_soc_bind_card+0x280/0x99c [snd_soc_core]) > [] (snd_soc_bind_card [snd_soc_core]) from []=20 > (devm_snd_soc_register_card+0x34/0x6c [snd_soc_core]) > [] (devm_snd_soc_register_card [snd_soc_core]) from=20 > [] (vc4_hdmi_bind+0x43c/0x5f4 [vc4]) > [] (vc4_hdmi_bind [vc4]) from []=20 > (component_bind_all+0xec/0x24c) > [] (component_bind_all) from []=20 > (vc4_drm_bind+0xd4/0x174 [vc4]) > [] (vc4_drm_bind [vc4]) from []=20 > (try_to_bring_up_master+0x160/0x1b0) > [] (try_to_bring_up_master) from []=20 > (component_master_add_with_match+0xd0/0x104) > [] (component_master_add_with_match) from []=20 > (vc4_platform_drm_probe+0x9c/0xbc [vc4]) > [] (vc4_platform_drm_probe [vc4]) from []=20 > (platform_drv_probe+0x6c/0xa4) > [] (platform_drv_probe) from []=20 > (really_probe+0x210/0x350) > [] (really_probe) from []=20 > (driver_probe_device+0x5c/0xb4) > [] (driver_probe_device) from []=20 > (device_driver_attach+0x58/0x60) > [] (device_driver_attach) from []=20 > (__driver_attach+0x80/0xbc) > [] (__driver_attach) from []=20 > (bus_for_each_dev+0x68/0xb4) > [] (bus_for_each_dev) from []=20 > (bus_add_driver+0x130/0x1e8) > [] (bus_add_driver) from [] (driver_register+0x78/0x1= 10) > [] (driver_register) from []=20 > (do_one_initcall+0x50/0x220) > [] (do_one_initcall) from [] (do_init_module+0x60/0x2= 10) > [] (do_init_module) from [] (load_module+0x1e34/0x233= 8) > [] (load_module) from [] (sys_finit_module+0xac/0xbc) > [] (sys_finit_module) from []=20 > (ret_fast_syscall+0x0/0x54) > Exception stack(0xeded9fa8 to 0xeded9ff0) > ... > ---[ end trace 6414689569c2bc08 ]--- >=20 > This warning is not present when booting ARM 64bit kernel, but I suspect= =20 > that this is due to the differences in the kernel configuration. It's because vc4 is not yet supported on RPi4. Maxime Rippard is working on it: https://lkml.kernel.org/lkml/20200629142145.aa2vdfkgeugrze4c@gilmour.lan/T/= . Regards, Nicolas --=-T29H5IrPZ4ZcZyWqZhnQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl77MV8ACgkQlfZmHno8 x/66bAgAktufM8XXiMg8VmO5FvXnUAStB4/HSj094uDC4x6SsNgedaj5oXxcISV1 wyd/bI0wBvRzKtfAae2zMZ7BYExeeXReLIMXSbdgZYPWaFk6AQebEf5CKe6AXDlg BJU95OF77zjJo/V9YzV93+fnt5Er2KfqDEaMo43hSGLxFCoON0lPRX0u6v66ytNH 4W3yy00Mn7ZZ7TvqucfLfrIsKSR69B1MHiKV/u/If/NgeTaiq2ELz9kwdbTlnUH3 LRPxN0dmJ7WedL5hA7AS4czJrGyh9ITIyGha+osYofGGdxZEsGbHqzRyAefzsjUm 3vWo1Wbh6TmTYRS+8H3Nt/cNHjpzGw== =M03X -----END PGP SIGNATURE----- --=-T29H5IrPZ4ZcZyWqZhnQ-- --===============2089132563793919657== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2089132563793919657==--