[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200128135810.897145079@linuxfoundation.org>
Date: Tue, 28 Jan 2020 15:07:41 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Jouni Hogander <jouni.hogander@...kie.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 4.19 13/92] net-sysfs: fix netdev_queue_add_kobject() breakage
From: Eric Dumazet <edumazet@...gle.com>
commit 48a322b6f9965b2f1e4ce81af972f0e287b07ed0 upstream.
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@...gle.com>
Cc: Jouni Hogander <jouni.hogander@...kie.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/core/net-sysfs.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1484,6 +1484,7 @@ static int netdev_queue_add_kobject(stru
#endif
kobject_uevent(kobj, KOBJ_ADD);
+ return 0;
err:
kobject_put(kobj);
Powered by blists - more mailing lists