Received: by 10.192.165.148 with SMTP id m20csp4939850imm; Tue, 24 Apr 2018 10:53:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48HURVHMD+6JflXbEV6tQp8nAI5Po6AHfmNomYVJSxvUvGDG4wljzg1lu8YlzLHYMYVM6m0 X-Received: by 10.167.134.70 with SMTP id a6mr24874888pfo.203.1524592390210; Tue, 24 Apr 2018 10:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592390; cv=none; d=google.com; s=arc-20160816; b=d9A9ugeo6ImeOr+nM8HkLgSxucgxIsRVWyeszVPlBzska341XD9ngh21K0Qk0/cAVn 7jNPVFDmdMZSfk4QeCIGcp0BNL3X6HWKdPMRUDo1Q4NIHGg6sOS3BGfoUo58UfPeBTNf JkExtmOA8GAgnF7prO9d+o7O+U53L8IU2An0bMdTRcWxHGXXLqqgARc1OmuCzBUWaJ6b gsL4LQTr7+DWv0PRlvz7M/4yx5QtnkrpaphDI/lgRthXUtfd6ZWqbezW3dJ2W3Dj8bu+ VOi9D9z0N56xHNms6Et50RZIt4f8BrofytSC9L/Na0SwIvnggdqdReFLyYAHwcKVHAdK OlDw== 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:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=knCrih7GsL5sOuUlI3KLSkQBIe3GN3GqABhIJY0Z2xg=; b=OdwW5HiHfGlmuZ4NQQ7e+eee38dyvOFSpCI+0AZrxsLA2HMetpHgjvk+rCrDLyv+Lx sQ6urYSNKlBGgB7Tsq+/AqlvC7ViEZwpgT3BiiU81uoiwFBm3g4WOqdpYsBwMxPj2G/E q+KJ7ko7z0h0UWva5LVdFhZfGfKYG4l2ZSSK11OGYTYSwjf9/AjbE94Id+Dai4T8V9Gv wZCbp4WWELCjmsp7b7uQRVUatUnEmxJlXFYxx96+q5z7pIAnZp6YiUEkxMQCoNKnyEIl up7myBNI0PXfKmWnaQB/zZ4Im36T16eaJ8+ZpwsObjA+oFg8bOUq0wgybqaiDGd56d59 gWmw== 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 u71si6887626pgc.20.2018.04.24.10.52.56; Tue, 24 Apr 2018 10:53:10 -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; 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 S1752350AbeDXRuf (ORCPT + 99 others); Tue, 24 Apr 2018 13:50:35 -0400 Received: from thoth.sbs.de ([192.35.17.2]:47595 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbeDXRud (ORCPT ); Tue, 24 Apr 2018 13:50:33 -0400 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3OHoSrE021078 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 19:50:28 +0200 Received: from [139.22.34.189] ([139.22.34.189]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w3OHoRWN020991; Tue, 24 Apr 2018 19:50:28 +0200 Subject: Re: [PATCH] of: overlay: Stop leaking resources on overlay removal To: Frank Rowand , Pantelis Antoniou , Rob Herring , devicetree Cc: Linux Kernel Mailing List , Alan Tull References: <097f1b01-6cb4-8dcb-0498-7b4c59a7ea53@siemens.com> <7aca82c1-a02c-2f84-bc32-6e8a118ba601@gmail.com> From: Jan Kiszka Openpgp: preference=signencrypt Message-ID: <90e7da9d-d40a-17f1-e627-873f58a3dce5@siemens.com> Date: Tue, 24 Apr 2018 19:50:27 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <7aca82c1-a02c-2f84-bc32-6e8a118ba601@gmail.com> 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 2018-04-24 19:44, Frank Rowand wrote: > On 04/24/18 09:19, Jan Kiszka wrote: >> Only the overlay notifier callbacks have a chance to potentially get >> hold of references to those two resources, but they do not store them. >> So it is safe to stop the intentional leaking. >> >> See also https://lkml.org/lkml/2018/4/23/1063 and following. >> >> Signed-off-by: Jan Kiszka >> --- >> >> Ideally, we sort out any remaining worries during the 4.17-rc cycle. >> >> drivers/of/overlay.c | 13 ++----------- >> 1 file changed, 2 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c >> index b35fe88f1851..3553f1f57a62 100644 >> --- a/drivers/of/overlay.c >> +++ b/drivers/of/overlay.c >> @@ -671,17 +671,8 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs) >> of_node_put(ovcs->fragments[i].overlay); >> } >> kfree(ovcs->fragments); >> - >> - /* >> - * TODO >> - * >> - * would like to: kfree(ovcs->overlay_tree); >> - * but can not since drivers may have pointers into this data >> - * >> - * would like to: kfree(ovcs->fdt); >> - * but can not since drivers may have pointers into this data >> - */ >> - >> + kfree(ovcs->overlay_tree); >> + kfree(ovcs->fdt); >> kfree(ovcs); >> } >> >> > > Nack. It is premature to submit this while the conversation is > continuing in the other thread. > > I'll continue the conversation in the other thread. > Well, at least the strongest argument has been resolved now, the notifier topic. Curious to learn what remains. As I noted, we should work hard to sort out the API regression prior to the release. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux