netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net-sysfs: fix netdev_queue_add_kobject() breakage
@ 2019-11-21  3:19 Eric Dumazet
  2019-11-21  6:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2019-11-21  3:19 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet, Jouni Hogander

kobject_put() should only be called in error path.

Fixes: b8eb718348b8 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jouni Hogander <jouni.hogander@unikie.com>
---
 net/core/net-sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 4f404bf33e44c977c1a8ba00706817b76215b75c..ae3bcb1540ec57df311dac6847323a23a74ec960 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1474,6 +1474,7 @@ static int netdev_queue_add_kobject(struct net_device *dev, int index)
 #endif
 
 	kobject_uevent(kobj, KOBJ_ADD);
+	return 0;
 
 err:
 	kobject_put(kobj);
-- 
2.24.0.432.g9d3f5f5b63-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net-sysfs: fix netdev_queue_add_kobject() breakage
  2019-11-21  3:19 [PATCH net] net-sysfs: fix netdev_queue_add_kobject() breakage Eric Dumazet
@ 2019-11-21  6:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-21  6:16 UTC (permalink / raw)
  To: edumazet; +Cc: netdev, eric.dumazet, jouni.hogander

From: Eric Dumazet <edumazet@google.com>
Date: Wed, 20 Nov 2019 19:19:07 -0800

> kobject_put() should only be called in error path.
> 
> Fixes: b8eb718348b8 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Jouni Hogander <jouni.hogander@unikie.com>

Sorry, I should push back harder in the future.

Applied, thanks Eric.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-21  6:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-21  3:19 [PATCH net] net-sysfs: fix netdev_queue_add_kobject() breakage Eric Dumazet
2019-11-21  6:16 ` David Miller

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).