Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2660798imu; Thu, 24 Jan 2019 17:33:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN7JjPFW0CCH9UZc9xgx1ZRgEAn8etbp+Dp9b/mpSYYidNffzKlNYsbVp0spgIMv2H+rqTZw X-Received: by 2002:a62:3541:: with SMTP id c62mr8846484pfa.19.1548379996173; Thu, 24 Jan 2019 17:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548379996; cv=none; d=google.com; s=arc-20160816; b=s7jsIhD90No1sK/XygxtwuhARGsmnrekiF5nUURw1pRRaBZ2B8BndeoJ/IGwglcNw7 NM0TaO/J9VjqvUb/lu+oAZy9QVKScQf3xMcSSEK+YvbYkLSTqNxJYTL6c51KJ0Mz3c5s fbxy7iKvdQxyiMx2EWXa7tW8OOKzChe0nRr2VrgU4Fa2bAz3P9NtgEJReh57IdIUJSJA POERO8Oc6Py3QKiVVAQtK0Awz4hLOaRg6aQ02JEUDI6mSvelIuGOhfYo0ynmZQCDdXHt 5VtLbO8E5w9gC5v5GvphluAxPwRkakl8VfgUnpuI8EwyxCZA1R9jHgpqt2JOLfNBLZG6 x3rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ivsMZ6gUkEBmy2LkIHbFygoYqdG1ahU5/kfkzXuz0nc=; b=wKyHa46LClnI8vFQ8a648cG0SyxArOWbio+CufifbYpseRzDhLlC4gvy47W9wz+bh3 Bz0qlWjf24EJm1ZgNlvyzM6JriEj0JI08YG3R418pbNNQh2l+6GM9XWutt/SaSQJCXy5 Q+SF87ufkL1Ec3faCukD1oA/sI712/CveXV4wOdpWCpHQ8awnIxQ8mlSvsLqfyuOP9/Y xhQNNRGy+ToQS5yW6JHrZcUd+eAH0DXutQ+rZmEuCj0p8WxAJk65ICcdl+fAGJtIpnFU ebyiq8+GCYVt1J09Zwls4Eatd2FS253H4Kob+kAeN2olm7vtpLPTxYwhIyDPVklTsf2Y 9sKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=D22+NjvF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si24298662pgn.32.2019.01.24.17.32.58; Thu, 24 Jan 2019 17:33:16 -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=@google.com header.s=20161025 header.b=D22+NjvF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728248AbfAYBcy (ORCPT + 99 others); Thu, 24 Jan 2019 20:32:54 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:35915 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727983AbfAYBcy (ORCPT ); Thu, 24 Jan 2019 20:32:54 -0500 Received: by mail-lj1-f196.google.com with SMTP id g11-v6so7009636ljk.3 for ; Thu, 24 Jan 2019 17:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ivsMZ6gUkEBmy2LkIHbFygoYqdG1ahU5/kfkzXuz0nc=; b=D22+NjvFX4R9GN44qTX9UVx01+xXSGDFYLr/daVvFLeWEs3B186M+c+YiQqg9uXd+T H8fqwJTkD0piK86KNRsIBL2RS89radUuTSOLAnK+mpyaUXpUOdUiTCS4aqi+G6IuCCdg XYErwj5i6+e6oEDlhMa/dh/nKhrPH2Gvwy+WW8tWw8OipofMadDE+o51DyUXIXuzx4uK 3SA5FQXPgYtKNHkcp5u6RFYOpBPMjlAMQZKjLez88eOnAdWiiyaSYTlVWBYs1qmHLTVx /msHtkevF5PN1mAuFZ/zL1PaACaYM786LWROQPuFrP2PfqEtxPNhxCVhLeFFakVwkMS2 nQpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ivsMZ6gUkEBmy2LkIHbFygoYqdG1ahU5/kfkzXuz0nc=; b=L0Mm6K/BoTPnY8IlZeSGujKFILERblQWQObxEI99Mskxp+5HpTCBlgP1MiTYWlAld0 TKikTJFoBoeaouzHwXoyJwSN6jtBh4E7mFOqQP3yf8XhNFilSQ01I0fgF8DDHVz6/rsK amHlUQjh5TJvltuDZkvyfPtnVroy0hnrMPFuPT6ggCNYtOoc/t9ek+iJNVer0TqGNKLP aFH3PS/d1mPyhia6QKT0XoYB5veKGRxCd0vct5YddQPh5fRXyjgNDZM793SqxvH/MfJP KMGrxTGftsqR8zzeDVqm/C5b0xxH8z6mHNmqibLZ+t7WdDyoC2cayBoqwcuaS/GV94/K o32Q== X-Gm-Message-State: AJcUukeWzfZxt/U7iRnwqYel8vsD1Badz3tS7oUUUN6zpVeH/7aqv9MO E5kHQlgL7PicWu2dSFa8T2oeBEr0rndSSXKfXaW+ZA== X-Received: by 2002:a2e:4a19:: with SMTP id x25-v6mr6437733lja.19.1548379971021; Thu, 24 Jan 2019 17:32:51 -0800 (PST) MIME-Version: 1.0 References: <20190115211137.rhdyjadu7fppp3p4@lenny.lan> <044d59ba-094e-727d-14a9-6ebfc54cbbf4@linux.intel.com> <44029078-2749-5a3b-7b03-f38461bf268f@linux.intel.com> <20190124184412.GH5641@sirena.org.uk> <976ec85a-7b21-6c58-90cc-a3d104f9505a@linux.intel.com> <20190124192652.GK5641@sirena.org.uk> In-Reply-To: <20190124192652.GK5641@sirena.org.uk> From: Curtis Malainey Date: Fri, 25 Jan 2019 09:32:38 +0800 Message-ID: Subject: Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component To: Mark Brown Cc: Pierre-Louis Bossart , rohkumar@qti.qualcomm.com, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, Vinod Koul , Liam Girdwood , plai@codeaurora.org, linux-kernel@vger.kernel.org, Ajit Pandey , tiwai@suse.com, Liam Girdwood , Matthias Reichl , Rohit kumar , asishb@codeaurora.org, Srini Kandagatla , Curtis Malainey , Dylan Reid Content-Type: multipart/mixed; boundary="0000000000002711a205803e4eae" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000002711a205803e4eae Content-Type: text/plain; charset="UTF-8" I have a patch to fix the memory leak but I haven't been able to test it yet because I am remote right now and I accidentally bootlooped the AMD device I am working on. I will have this tested early next week. Here is the patch for anyone interested. Curtis Malainey | Software Engineer | cujomalainey@google.com | 650-898-3849 On Fri, Jan 25, 2019 at 3:26 AM Mark Brown wrote: > > On Thu, Jan 24, 2019 at 01:07:17PM -0600, Pierre-Louis Bossart wrote: > > > Thanks for the feedback, will send a formal patch with the helper and > > machine driver changes after I test more with the legacy drivers. Do you > > have a preference for one patch that deals with multiple machines drivers in > > one shot, or individual patches? The latter are nicer for backports (e.g. > > for Chrome), the former nicer for maintainers... > > More patches is good, it doesn't make a huge difference if I get one big > patch or a series of repetitive patches - big serieses are more of an > issue if they're all different patches needing individual review. --0000000000002711a205803e4eae Content-Type: application/octet-stream; name="0001-ASoC-soc-core-clear-platform-pointers-on-error.patch" Content-Disposition: attachment; filename="0001-ASoC-soc-core-clear-platform-pointers-on-error.patch" Content-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