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: 5009851 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 45D219F327 for ; Wed, 1 Oct 2014 06:36:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67F4B20260 for ; Wed, 1 Oct 2014 06:36:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D76E20127 for ; Wed, 1 Oct 2014 06:36:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751192AbaJAGgx (ORCPT ); Wed, 1 Oct 2014 02:36:53 -0400 Received: from mail-qa0-f47.google.com ([209.85.216.47]:60147 "EHLO mail-qa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbaJAGgw (ORCPT ); Wed, 1 Oct 2014 02:36:52 -0400 Received: by mail-qa0-f47.google.com with SMTP id cm18so91915qab.34 for ; Tue, 30 Sep 2014 23:36: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 Cc: linux-samsung-soc , "linux-arm-kernel@lists.infradead.org" , Linux USB Mailing List , Alan Stern Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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) {