Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2132023imj; Mon, 18 Feb 2019 00:07:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IYgQ7N1xy4Vlu8VD4AjleluI48EQD2bEWoZl7T9RUCIMTviP+zPHWuVWns4VxwF7YwO4iWz X-Received: by 2002:a17:902:3f81:: with SMTP id a1mr24049088pld.258.1550477272271; Mon, 18 Feb 2019 00:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550477272; cv=none; d=google.com; s=arc-20160816; b=KA4DUlfpM+L5or6jid/KT0OW/Va9cNAdIqxiTlPKpQ7yRTFhQqpaADLqol+OrnQ6Ck 69xv41wniUg/CYNrRlyhQsfateijJ4OucpBQ3VEPhB/gj53UDZyI1pNfBEogH7BZmapL +TozxSpuh7+x6usjqdEbPjavb2Mib8GFOLlefd5olYUAx2Z65bBtP7xyFSYXYU3NREja c9KcpTULgG3jI64yf9sr6NcoeY2r0FIIoZFhXqJ/sUXXknWsqhk6p5UG1LSjXPbsibcs /pQGn9Bp2jsul8QAYp4Zb2piKKT90lLUP0VTdGDxfxH5g3PWUW+GxX/dprKZr/X5GHbp rw6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=3HrHg96Xd7Nsju+z9bUwOmwkxX71Kum49TAcKds5SK8=; b=jFbbeYK+TWKnj/RzqMAwGHy5ZmybmKkksQCUZ6hiJcS3l08QiPWYJ+gln85YE6qI8M eV/ihDT/OWPOPs5JTNkGu7aD1eAa46AO7J8yjzodn0+7GFtj4wJfTOV/Xv1CkSRjY/nZ CG1M4O82XZwen9QWneKT82eGZr17GOzW3AiDMicvMFS/6FS03omE2Q40gtWrQYYRVcB3 azsA1owqICxq2ErspFAB6mGPBqyJxzqfU9ErSOAP4HRcXnMQ+0Y98LArE7p81qZotSey s13HlCwW5TvXeSquW1aXWfvfMqVCpAAPf9h1UUNcz4u2p55fbDJoppUGWuQUNlQ2wCtL aafA== 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 u2si4820261pls.34.2019.02.18.00.07.35; Mon, 18 Feb 2019 00:07:52 -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 S1728916AbfBRHw3 (ORCPT + 99 others); Mon, 18 Feb 2019 02:52:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:42516 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725881AbfBRHw3 (ORCPT ); Mon, 18 Feb 2019 02:52:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 49A2DAFBE; Mon, 18 Feb 2019 07:52:27 +0000 (UTC) Date: Mon, 18 Feb 2019 08:52:26 +0100 Message-ID: From: Takashi Iwai To: "Daniel Baluta" Cc: "kuninori.morimoto.gx@renesas.com" , "alsa-devel@alsa-project.org" , "lgirdwood@gmail.com" , "vicencb@gmail.com" , "broonie@kernel.org" , "gregkh@linuxfoundation.org" , "dl-linux-imx" , "S.j. Wang" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ASoC: simple-card: Fix refcount underflow In-Reply-To: References: <20190216100927.10017-1-daniel.baluta@nxp.com> <87pnrp52jl.wl-kuninori.morimoto.gx@renesas.com> <87lg2d51lv.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Feb 2019 08:06:19 +0100, Daniel Baluta wrote: > > On Mon, 2019-02-18 at 10:37 +0900, Kuninori Morimoto wrote: > > Hi Daniel, Mark, again > > > > > > of_get_child_by_name() takes a reference we'll need to drop > > > > later so when we substitute in top we need to take a reference > > > > as well as just assigning. > > > > > > > > Without this patch we hit the following error: > > > > > > > > [ 1.246852] OF: ERROR: Bad of_node_put() on /sound-wm8524 > > > > [ 1.262261] Hardware name: NXP i.MX8MQ EVK (DT) > > > > [ 1.266807] Workqueue: events deferred_probe_work_func > > > > [ 1.271950] Call trace: > > > > [ 1.274406] dump_backtrace+0x0/0x158 > > > > [ 1.278074] show_stack+0x14/0x20 > > > > [ 1.281396] dump_stack+0xa8/0xcc > > > > [ 1.284717] of_node_release+0xb0/0xc8 > > > > [ 1.288474] kobject_put+0x74/0xf0 > > > > [ 1.291879] of_node_put+0x14/0x28 > > > > [ 1.295286] __of_get_next_child+0x44/0x70 > > > > [ 1.299387] of_get_next_child+0x3c/0x60 > > > > [ 1.303315] simple_for_each_link+0x1dc/0x230 > > > > [ 1.307676] simple_probe+0x80/0x540 > > > > [ 1.311256] platform_drv_probe+0x50/0xa0 > > > > > > > > This patch is based on an earlier version posted by Kuninori > > > > Morimoto > > > > and commit message includes explanations from Mark Brown. > > > > > > > > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.kernel.org%2Fpatch%2F10814255%2F&data=02%7C01%7Cdaniel.baluta%40nxp.com%7Ced1b7adc66a546c1bb4608d69541aaf8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636860506617983174&sdata=hTsurDLdtLAtTw0a5v%2FrSsleSawAP2yiVPl87%2BHCzTI%3D&reserved=0 > > > > > > > > Reported-by: Vicente Bergas > > > > Signed-off-by: Daniel Baluta > > > > --- > > > > > > I'm not sure which one is correct in this case > > > > > > Signed-off-by: Kuninori Morimoto > > > > > > or > > > > > > Acked-by: Kuninori Morimoto > > > > And we want to add > > > > Fixes: commit da215354eb55c ("ASoC: simple-card: merge simple-scu- > > card") > > > > Thanks! I thought about adding this but the current patch will not > cleanly apply because of: > > 2d01a84605a55c ("ASoC: simple-card: reduce naming prefix") Yeah, it's a bit tricky because of the code change at this time. At best, send two patches, once for 5.0 and once for 5.1, and let Mark apply both of them and do the empty merge from 5.0 to 5.1, or let him resolve the merge conflict by applying manually the 5.1 patch. thanks, Takashi