From: Jakub Kicinski <kuba@kernel.org>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Ronald Tschalär" <ronald@innovation.ch>,
"Nicolai Stange" <nicstange@gmail.com>,
"David Rientjes" <rientjes@google.com>,
"Srivatsa Vaddagiri" <vatsa@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: debugfs_create_u32_array() memory leaks
Date: Fri, 19 Jun 2020 16:17:34 -0700 [thread overview]
Message-ID: <20200619161734.25e99fa4@kicinski-fedora-PC1C0HJN> (raw)
Hi!
I'm trying to use debugfs_create_u32_array() in drivers/net/netdevsim
and it causes memory leaks:
unreferenced object 0xffff8880546642a0 (size 16):
comm "test_udp_tuns.s", pid 2146, jiffies 4294928368 (age 3772.435s)
hex dump (first 16 bytes):
84 52 6a 4d 80 88 ff ff 04 00 00 00 f3 78 7e 89 .RjM.........x~.
backtrace:
[<000000006962a447>] debugfs_create_u32_array+0x3f/0x90
I can see that debugfs_create_u32_array() allocates a structure at
create time that ends up assigned to inode->i_private, but I don't
see it freed anywhere.
Am I missing something? I'm pretty sure files get removed, cause the
driver calls debugfs_remove_recursive() and no other file types leaks.
next reply other threads:[~2020-06-19 23:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 23:17 Jakub Kicinski [this message]
2020-06-20 7:45 ` Greg Kroah-Hartman
2020-06-22 19:23 ` Jakub Kicinski
2020-06-22 19:31 ` Greg Kroah-Hartman
2020-06-23 20:21 ` Jakub Kicinski
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=20200619161734.25e99fa4@kicinski-fedora-PC1C0HJN \
--to=kuba@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicstange@gmail.com \
--cc=rafael@kernel.org \
--cc=rientjes@google.com \
--cc=ronald@innovation.ch \
--cc=vatsa@linux.vnet.ibm.com \
/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®