Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936074AbcCQNEZ (ORCPT ); Thu, 17 Mar 2016 09:04:25 -0400 Received: from mga04.intel.com ([192.55.52.120]:56345 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932324AbcCQNEU (ORCPT ); Thu, 17 Mar 2016 09:04:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,350,1455004800"; d="scan'208";a="939327093" From: "Pan, Harry" To: "lars@metafoo.de" , "broonie@kernel.org" CC: "lgirdwood@gmail.com" , "linux-kernel@vger.kernel.org" , "gs0622@gmail.com" , "alsa-devel@alsa-project.org" , "tiwai@suse.com" , "perex@perex.cz" Subject: Re: [PATCH] ASoC: dapm: Do not traverse widget hooks to snd-soc-dummy Thread-Topic: [PATCH] ASoC: dapm: Do not traverse widget hooks to snd-soc-dummy Thread-Index: AQHRf3aMxa2bWOYG7kihrqwHUdc/3p9c4P8AgAAMSICAAA0JAIAAFCAAgAAHh4A= Date: Thu, 17 Mar 2016 13:04:15 +0000 Message-ID: <1458219853.24844.10.camel@intel.com> References: <1458127071-14417-1-git-send-email-harry.pan@intel.com> <20160317095438.GD2566@sirena.org.uk> <1458211115.965.13.camel@intel.com> <20160317112514.GE2566@sirena.org.uk> <56EAA4FC.5090408@metafoo.de> In-Reply-To: <56EAA4FC.5090408@metafoo.de> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.184.165] Content-Type: text/plain; charset="utf-8" Content-ID: <1A2815CFB6FB5A4889A88817CBE63027@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u2HD4Tw4019204 Content-Length: 919 Lines: 32 > I'd say as a quick fix for stable check that card is not NULL in > dapm_widget_show_component(). And as a longterm fix get rid of > dapm_widget > file. Nobody should hopefully use it anymore with debugfs being > available as > the far better alternative. > > - Lars Well, that was my original approach while I realized problem is caused by de-referencing a null pointer to its member of 'widget' list. i.e. https://chromium-review.googlesource.com/#/c/331285/3/sound/soc/soc-dap m.c +   if (WARN_ON(!codec->component.card)) +       return 0; + Additional remark is that I was working on chromium-os v3.18 kernel, so that the interface and argument are sort of different than what I then cherry-pick'ed then sent, which was based on latest 4.5. Then I was stuck at here couple days keeping hunting root cause, Turned out I found that commit skipped probing dummy component. Long story short. -Harry