Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6574289imu; Mon, 21 Jan 2019 11:19:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN4qYSPwMsaSy4Lcil4e8N74ThAikSB3wIKr0R+JrFjb42GIyMy3TbRZ7tyDJ+46MFKWTRUV X-Received: by 2002:a63:d40a:: with SMTP id a10mr28706289pgh.394.1548098371260; Mon, 21 Jan 2019 11:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548098371; cv=none; d=google.com; s=arc-20160816; b=Ai6gW/dsTkxl0BHQkevl9/JNHqG/B93YkoFI7U6FtZnAt1NlvWecAoMmInZoMovu4i O6e4FeSL5D755CsQop7mcc0LGc/9ZHE/IhEzgcxvzfted9U17LzGoo6esJ2xv7UcvEfK e/PJXB+bY4KeJUf/G4TrF8ykvkYzATDN0nqu3ZpoiO44Z34jkoKWBTONY1LgT43gHU5K +aJXdyNG0+OzhkHI3XEYDz3Uo1Jo03nBvC+T/RkYpaEWs3GzBTbJeraEtcHVyeZzC+yN 9ktH8N74wup1IsdWI9/60XrUD+2rJWK+iuLQdu+bu0wAjmbAc51jXXYCIONswaoVN4om 9FGg== 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:dkim-signature; bh=ABra2Yo/iHC4fPDYfvaIx5OgvEUCJZykRNiJqAZkwIg=; b=OcjJd/sDnOVO6+X4UpJeX0H+wmyZVYyuBlKjGI3jiax3qnxyoUzaSwwiGULVWorHYb 6uLc/GDKAoE8VOxtD4TpidCSsf5Xy9zUdn7otPkn2zde8d1gTdAZp8Jz+40+SraVtPTM 8t+/63TX6x06clFm1dOfOfHdrmPkzUw9RuaF9MdhU9wKM9QFl60PC0UpcVj7AfylqSFX jIu+FF3gHTtnofVUpJ7ioKxe+cJEFacsvqqXDXUuFRNv23HM54wJAKVEAjy0sXhetU5E d2EKFipJ5QdwGBdCaiosE8f6IH5G+AP7sFNkW9YTCgolcIOqjIbr0HKyzQ/hI34geM5L SGIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=X34LuR4w; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si13207118pgb.298.2019.01.21.11.19.15; Mon, 21 Jan 2019 11:19:31 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=X34LuR4w; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727722AbfAUTR0 (ORCPT + 99 others); Mon, 21 Jan 2019 14:17:26 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:60184 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727490AbfAUTR0 (ORCPT ); Mon, 21 Jan 2019 14:17:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ABra2Yo/iHC4fPDYfvaIx5OgvEUCJZykRNiJqAZkwIg=; b=X34LuR4wVujh08d+GlOjUNrHF lO2iG5lUuedCqqleGk4fxaqKxLoyoQwBO7YCz+oFBMgQ/YKHjDl/3sYcU+Df4mBAQz346YNLo3LTk PnManeC5X/iI9H6ZSAEDBY/IQOtizNXufpDkmPFhJ3YWFA+E1eK5WN/IhJDIq1lUX2DBY=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1glf4N-0004zG-9u; Mon, 21 Jan 2019 19:17:15 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id BB67C1127D00; Mon, 21 Jan 2019 19:17:14 +0000 (GMT) Date: Mon, 21 Jan 2019 19:17:14 +0000 From: Mark Brown To: Pierre-Louis Bossart Cc: Matthias Reichl , rohkumar@qti.qualcomm.com, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, vinod.koul@linaro.org, lgirdwood@gmail.com, plai@codeaurora.org, linux-kernel@vger.kernel.org, tiwai@suse.com, Liam Girdwood , srinivas.kandagatla@linaro.org, Rohit kumar , asishb@codeaurora.org, Ajit Pandey , Curtis Malainey Subject: Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component Message-ID: <20190121191714.GG12679@sirena.org.uk> References: <1547194442-1487-1-git-send-email-rohitkr@codeaurora.org> <4886ed21-65d2-159d-afcd-bb26dcde636e@linux.intel.com> <20190115000610.GM11073@sirena.org.uk> <796a856c-a9a6-022d-da63-947279090198@linux.intel.com> <20190115211137.rhdyjadu7fppp3p4@lenny.lan> <044d59ba-094e-727d-14a9-6ebfc54cbbf4@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Wtrm9ATX0sn6fFKv" Content-Disposition: inline In-Reply-To: <044d59ba-094e-727d-14a9-6ebfc54cbbf4@linux.intel.com> X-Cookie: Body by Nautilus, Brain by Mattel. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Wtrm9ATX0sn6fFKv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 18, 2019 at 05:02:08PM -0600, Pierre-Louis Bossart wrote: > This PROBE_DEFER support actually breaks the topology override that we've > been relying on for SOF (and which has been in Mark's branch for some time > now). This override helps us reuse machine drivers between legacy and > SOF-based solutions. > With the current code, the tests in soc_register_card() complain that the > platform_name can't be tied to a component and stop the card registration, > but that's mainly because the tests are done before the topology overrides > are done in soc_check_tplg_fes(). Moving soc_check_tplg_fes() from > soc_instantiate_card() to an earlier time in soc_register_card() > works-around the problem but looks quite invasive (mutex lock, etc). Right, I see. I don't think there's going to be any non-invasive solution here, either we need to stop overriding bits of the machine driver relevant to binding in the topology files like this or we need to look at the topology files in the probe deferral stuff so it's either going to be very invasive for the machine driver or the core. I'm tempted to say that the machine driver is a better option here. > This last assignment guarantees that memory will be allocated every time > this function is called, and whatever overrides are done later will > themselves be overridden by the new allocation. I am not sure what the > intent was here, Curtis can you please double-check? The intent is to avoid modifying statically allocated data so we can tell the difference between pointers set up statically as init data and those that are filled in at runtime. --Wtrm9ATX0sn6fFKv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlxGGrkACgkQJNaLcl1U h9BbKQf+J6unfU3lGiLZVjb2hKojpp7QoEMpMTY0qRP0NuUfiBlBrRpkIq3i9hR7 wBcqNI2lRBh3sb03R5kdkD2wDzw208wVDscH7ijeKp+k0UbZwkhNthr0U3+EJFt0 5j/yLk2fcNhMRnMvyucc0ChXQjsUsYLaCZIswO3FfSuFp3jOSHGx15Dc6E8yY8xQ ziU8h02vga+M9RHBtGFcDDXlxmaPw50gWlDeMmkI9HsCYeB6N8xdmYNtj3t5XKS4 PiJTkvlFVKptngEK+5fzRJuluQijWGrkz3nDEOqMh/7m61GrIHm3lDpAsiFOq1Um 9/7KmsmyOJOgziIOwa7iIIFQJf1fEg== =J68C -----END PGP SIGNATURE----- --Wtrm9ATX0sn6fFKv--