From: David Miller <davem@davemloft.net>
To: jouni.hogander@unikie.com
Cc: netdev@vger.kernel.org, lukas.bulwahn@gmail.com
Subject: Re: [PATCH] net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject
Date: Tue, 19 Nov 2019 17:13:33 -0800 (PST) [thread overview]
Message-ID: <20191119.171333.624799505921966746.davem@davemloft.net> (raw)
In-Reply-To: <20191119095121.6295-1-jouni.hogander@unikie.com>
From: jouni.hogander@unikie.com
Date: Tue, 19 Nov 2019 11:51:21 +0200
> kobject_init_and_add takes reference even when it fails.
I see this in the comment above kobject_init_and_add() but not in the
code.
Where does the implementation of kobject_init_and_add() actually take
such a reference?
Did you discover this by code inspection, or by an actual bug that was
triggered? If by an actual bug, please provide the OOPS and/or checker
trace that indicated a leak was happening here.
I don't see anything actually wrong here because kobject_init_and_add()
doesn't actually seem to do what it's comment suggests...
next prev parent reply other threads:[~2019-11-20 1:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 9:51 [PATCH] net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject jouni.hogander
2019-11-20 1:13 ` David Miller [this message]
2019-11-20 6:59 ` Jouni Högander
-- strict thread matches above, loose matches on Subject: below --
2019-11-20 7:08 jouni.hogander
2019-11-20 20:10 ` David Miller
2019-11-21 3:12 ` Eric Dumazet
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=20191119.171333.624799505921966746.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jouni.hogander@unikie.com \
--cc=lukas.bulwahn@gmail.com \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).