From: Jan Kiszka <jan.kiszka@siemens.com>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
devicetree <devicetree@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alan Tull <atull@kernel.org>
Subject: [PATCH] of: overlay: Stop leaking resources on overlay removal
Date: Tue, 24 Apr 2018 18:19:55 +0200 [thread overview]
Message-ID: <097f1b01-6cb4-8dcb-0498-7b4c59a7ea53@siemens.com> (raw)
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 <jan.kiszka@siemens.com>
---
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);
}
--
2.13.6
next reply other threads:[~2018-04-24 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 16:19 Jan Kiszka [this message]
2018-04-24 17:44 ` Frank Rowand
2018-04-24 17:50 ` Jan Kiszka
2018-04-24 20:58 ` Frank Rowand
2018-04-26 0:32 ` Frank Rowand
2018-04-26 0:44 ` Frank Rowand
2018-04-26 7:31 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=097f1b01-6cb4-8dcb-0498-7b4c59a7ea53@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=atull@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®