Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2296288imm; Thu, 18 Oct 2018 12:12:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ppINKWVQIarBl4r7VkMN+NjvY9Wo1sjesGPUXIr8BWIDyrdl/JBovoqczSpvb/gEOnkU8 X-Received: by 2002:a63:5308:: with SMTP id h8-v6mr28783259pgb.358.1539889920958; Thu, 18 Oct 2018 12:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539889920; cv=none; d=google.com; s=arc-20160816; b=wjFBiqWrPA+UOMjYlCfby/zTYM0P93RRODK15f8nD46/0EaD6iNLNF4JFzcRvzWxBc rnDIJDkFBShUvodzgAdA9J0WwcTlWIoOlzL/ZyamBT6KddWK6/cD+AVsohh7yMPsfc30 uJrbMF8/YWJowIibPTtapePGMUiBMZiLvzSSpDrMkIZfvB8Z2+avYbFOae+weGgfaabK ZN8Y8agZ3sXXYfGKeYJ319HeJFVl/p3RnbTxC+peEa2fR5g8z4ub+qQm181RpkKapI/Y NdYYT//Itb9Bjf1IzsD1RjdGy7zd9P2ICToH5TSUHMt7zTtol97Kn9HMN8FZXvzLEpvk TOMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gwpwnYRgUa/crfPYjADA11QX441Pokb9UOZ9HNVy7Bs=; b=pEcFny/Xma93Myk53kZ6k7wIk03b8ctNkHWe5shKU6CVvdHpdmCiu6mzmcK3oIQjEy o0Pwo+ENgcJ3/DKdV6MqW73xxNZn/DYVVtUOLz5VXM1wN92ImSdZrGxz3Rvy03wzCVpt Dr+oFJnli3nRFqQyqbOEHFzFNxFsEsV0H534yUIZRw8vwAn1AWgX12W1rK6XmGKKYAqm EhZKbBmGvV0ErFpbaVgyt2KQyO0iYsu3o0yFHob/KCQAVRHMAdf8BIFHHnAe7Nho5nUB i/1o7OzsfFq8vMifWGGomjnNao1hgYzEgKK6LO+6Ki1ckv7uN8HMn6m0bTTIf0I/VUdD ia3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AfxM/Q2a"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10-v6si19362511pfm.136.2018.10.18.12.11.45; Thu, 18 Oct 2018 12:12:00 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b="AfxM/Q2a"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726955AbeJSDMM (ORCPT + 99 others); Thu, 18 Oct 2018 23:12:12 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38769 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbeJSDMM (ORCPT ); Thu, 18 Oct 2018 23:12:12 -0400 Received: by mail-pl1-f195.google.com with SMTP id q19-v6so11665208pll.5; Thu, 18 Oct 2018 12:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gwpwnYRgUa/crfPYjADA11QX441Pokb9UOZ9HNVy7Bs=; b=AfxM/Q2aBvY9vYZRpW874dOnMJ2mnuapnlPFuKXnFoGGxeURI89nDTg/VHvBqlDHmR GgBeX19kSeMfjkYWl48ZYxNdVOY4vcsBsm/G7R0r2McIg8aDrPMdmwDy5EgTVK5vqgBi jBEdbc/14mXxyD8VtHmWL9LuhdL34Da7AQ7lK3wz0EtlSSloefyCkvWpRRzzpkT5CnDd qWUbx5GPyAkvTO75hJ0o62WgI1ETvs6Uh7Y768rUAu0qfsTRrTVtoBGryfjxFA4ie0RF FgzoXDo9h8960TT4/1I0VSXh0iMarUTMUG9XtKUWl16alAWlNbEZ7ngr7BfMbUJVTCX8 PqbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gwpwnYRgUa/crfPYjADA11QX441Pokb9UOZ9HNVy7Bs=; b=b3/BpF76VFcIZsbgVXDgkyP557IbBYve0jvakVcLImuJpF63J3Nx1e+fxT8zcXj8yX +eYfDrMzkotE4CwqQWwp6kUzbMikOOzo5ABDteoEUrRJmoYZQLFlz13jUB00Ih/g+hFX B9q2uEFeCYcT1gRNBaIOqzAz6dvifIjvTglWPz/WqCMNvh8mjh6TKTm/Pw9K6VKANwaV UFTH3zXfvYu3w8J1yyQ0Q70FlOtmjpv1EB65a/Q9+UewUuTEVHbUbnY9cPZriYMp+WWB Y+KiVkinuzRwLY03kirSBqAVA9jJZ+imaGQ8hi3AiffGMAYD3mSKWUGSrcfsH6l7/pZq +kkQ== X-Gm-Message-State: ABuFfoioVgTM6MuPUjhsQKw/4mb4YjpKwBhCfWTPVvsYnp4sBhDZfnRn 2mGJenSDLZxl9eW1QYvcaME= X-Received: by 2002:a17:902:ab93:: with SMTP id f19-v6mr30735680plr.63.1539889787347; Thu, 18 Oct 2018 12:09:47 -0700 (PDT) Received: from [192.168.1.70] (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id 64-v6sm42475226pfq.10.2018.10.18.12.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 12:09:46 -0700 (PDT) Subject: Re: [PATCH v4 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node() To: Rob Herring Cc: Pantelis Antoniou , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alan Tull , Moritz Fischer , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-fpga@vger.kernel.org References: <1539657458-24401-1-git-send-email-frowand.list@gmail.com> <1539657458-24401-5-git-send-email-frowand.list@gmail.com> <20181018170931.GC15557@bogus> From: Frank Rowand Message-ID: <780fb659-29e8-1ef4-4f62-97dacf36f6c8@gmail.com> Date: Thu, 18 Oct 2018 12:09:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181018170931.GC15557@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/18 10:09, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:24PM -0700, frowand.list@gmail.com wrote: >> From: Frank Rowand >> >> "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" >> added a missing of_node_get() to __of_attach_node_sysfs(). This >> results in a refcount imbalance for nodes attached with >> dlpar_attach_node(). The calling sequence from dlpar_attach_node() >> to __of_attach_node_sysfs() is: >> >> dlpar_attach_node() >> of_attach_node() >> __of_attach_node_sysfs() > > IIRC, there's a long standing item in the todo (Grant's) to convert the > open coded dlpar code. Maybe you want to do that first? I'd like to avoid extra delays to getting the current (with necesary fixes) series accepted because the series is rather intrusive and could have conflicts with other patches. I'm also worried that I don't have access to any of the systems that use the dynamic overlay code, and I don't have any way to test the changes. Can we encourage the users of this code to convert the open coded dlpar code? >> >> Signed-off-by: Frank Rowand >> --- >> >> ***** UNTESTED. I need people with the affected PowerPC systems >> ***** (systems that dynamically allocate and deallocate >> ***** devicetree nodes) to test this patch. > > Can't we write a test case that does the same thing? I could write a simplistic test case, but I'm concerned that simplistic is not anywhere near sufficient. And my test case would reflect the same assumptions I already have when I wrote this patch. >> >> arch/powerpc/platforms/pseries/dlpar.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c >> index a0b20c03f078..e3010b14aea5 100644 >> --- a/arch/powerpc/platforms/pseries/dlpar.c >> +++ b/arch/powerpc/platforms/pseries/dlpar.c >> @@ -272,6 +272,8 @@ int dlpar_detach_node(struct device_node *dn) >> if (rc) >> return rc; >> >> + of_node_put(dn); >> + >> return 0; >> } >> >> -- >> Frank Rowand >> >