From patchwork Wed Oct 1 06:36:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 5009891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5C876BEEA6 for ; Wed, 1 Oct 2014 06:46:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88D3D20142 for ; Wed, 1 Oct 2014 06:46:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9751F2012B for ; Wed, 1 Oct 2014 06:46:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZDe3-0007Ff-Cy; Wed, 01 Oct 2014 06:44:15 +0000 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZDe0-0007Cg-Tr for linux-arm-kernel@lists.infradead.org; Wed, 01 Oct 2014 06:44:13 +0000 Received: by mail-qc0-f181.google.com with SMTP id r5so124351qcx.26 for ; Tue, 30 Sep 2014 23:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XXGojrximl8DLPQcSRsQXtQ84QBh0CE9dTa+f4yf+zE=; b=hsEDdS8dyD+IRLVMCyutBWMhRnY4WFEYcelieMatrUnUig+YMZ82oZVezNYS5L5/ii /gYOSXX0pdqdDArlH7Cki+XRIKMFcAUTARKhVzw3JxVFQC+iZnM44FnpZt2gbCY3Oz0C SQUqBHpt532fKRLWx0osSu1oKJNhi2LEuccmho1XwFuiMjTQ62Qy2eoxguVRwMLEs1hg TZpDwRm1Rym3nyGfRX+z8j5APP/6jOWobjGeA29yPrTtS4nHGHI3/Rju2LHODwVjcLNx OQTwejN/OwVUUJs9MIozMbvHnz4A91GEOWKdjCqizzRW7MO/71Y6SFAg78BlfA4xhZ5M 8U2g== MIME-Version: 1.0 X-Received: by 10.229.131.5 with SMTP id v5mr17832356qcs.21.1412145411642; Tue, 30 Sep 2014 23:36:51 -0700 (PDT) Received: by 10.140.22.163 with HTTP; Tue, 30 Sep 2014 23:36:51 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Oct 2014 12:06:51 +0530 X-Google-Sender-Auth: K7WSIuKpglstF9A7vIWo15mqcZo Message-ID: Subject: Re: 3.17-rc6 on ODROID: ERROR: Bad of_node_put() on /ehci@12580000/port@1 From: Vivek Gautam To: Daniel Drake X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140930_234413_059547_67F5DE60 X-CRM114-Status: GOOD ( 17.80 ) X-Spam-Score: 0.3 (/) Cc: linux-samsung-soc , Alan Stern , Linux USB Mailing List , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Daniel, On Sat, Sep 27, 2014 at 5:54 AM, Daniel Drake wrote: > Hi, it's always good to keep the relevant mailing list also in CC (linux-usb). Also added Alan here. > > Booting 3.17-rc6 on ODROID-U2, I see this message: > > ERROR: Bad of_node_put() on /ehci@12580000/port@1 > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc6-00376-g85cd8fd #1031 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0x84/0xc4) > [] (dump_stack) from [] (kobject_cleanup+0x58/0x6c) > [] (kobject_cleanup) from [] > (of_get_next_available_child+0x78/0x98) > [] (of_get_next_available_child) from [] > (exynos_ehci_probe+0x254/0x424) > [] (exynos_ehci_probe) from [] > (platform_drv_probe+0x2c/0x5c) > [] (platform_drv_probe) from [] > (driver_probe_device+0xe8/0x234) > [] (driver_probe_device) from [] (__driver_attach+0x68/0x8c) > > This repeats for all of the ehci and ohci ports. > > Haven't had time to dig deeper. Is this a known issue? I don't think it's a known issue, atleast i don't see it on exynos5250-smdk5250. One reason i doubt why it could be coming is because we are specifically putting the child after doing everything with it. When we are getting the child node using for_each_available_child_of_node(), which calls for of_get_next_available_child(). So of_get_next_available_child() does a of_node_put() on the "prev" node, in case we have siblings to the child. Can you see if the below change helps ? ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ This is on top of usb-next. If you are testing on rc6 only, then probably you will have to cherrypick two patches each for ehci-exynos and ohci-exynos: usb: host: ehci-exynos: Remove unnecessary usb-phy support usb: host: ohci-exynos: Remove unnecessary usb-phy support diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 7189f2e..1b726bf 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -74,7 +74,6 @@ static int exynos_ehci_get_phy(struct device *dev, phy = devm_of_phy_get(dev, child, NULL); exynos_ehci->phy[phy_number] = phy; - of_node_put(child); if (IS_ERR(phy)) { ret = PTR_ERR(phy); if (ret == -EPROBE_DEFER) {