netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: clsoto@linux.vnet.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, brking@linux.vnet.ibm.com,
	j.vosburgh@gmail.com, gospo@cumulusnetworks.com,
	Carol L Soto <clsoto@linux.vnet.ibm.com>
Subject: [PATCH] net/bonding: Add function bond_remove_proc_entry at __bond_release_one
Date: Mon, 13 Jul 2015 13:57:28 -0500	[thread overview]
Message-ID: <1436813848-30995-1-git-send-email-clsoto@linux.vnet.ibm.com> (raw)

From: Carol L Soto <clsoto@linux.vnet.ibm.com>

Add function bond_remove_proc_entry at __bond_release_one to avoid stack 
trace at rmmod bonding.

[68830.202239] remove_proc_entry: removing non-empty directory
'net/bonding', leaking at least 'bond0'
[68830.202257] ------------[ cut here ]------------
[68830.202260] WARNING: at fs/proc/generic.c:562
[68830.202412] NIP [c0000000002abf6c] .remove_proc_entry+0x1fc/0x240
[68830.202416] LR [c0000000002abf68] .remove_proc_entry+0x1f8/0x240
[68830.202419] PACATMSCRATCH [8000000000009032]
[68830.202421] Call Trace:
[68830.202424] [c000000179277940] [c0000000002abf68] 
.remove_proc_entry+0x1f8/0x240 (unreliable)
[68830.202434] [c0000001792779f0] [d0000000053229a4] 
.bond_destroy_proc_dir+0x34/0x54 [bonding]
[68830.202440] [c000000179277a70] [d0000000053130e0] 
.bond_net_exit+0x90/0x120 [bonding]
[68830.202445] [c000000179277b10] [c00000000059944c] 
.ops_exit_list.isra.0+0x6c/0xd0
[68830.202450] [c000000179277ba0] [c000000000599774] 
.unregister_pernet_operations+0x94/0x100
[68830.202454] [c000000179277c40] [c000000000599814] 
.unregister_pernet_subsys+0x34/0x60
[68830.202460] [c000000179277cc0] [d000000005323758] 
.bonding_exit+0x48/0x2328 [bonding]
[68830.202466] [c000000179277d30] [c00000000010dcc4] 
.SyS_delete_module+0x1f4/0x340
[68830.202471] [c000000179277e30] [c000000000009e7c] 
syscall_exit+0x0/0x7c
[68830.202491] ---[ end trace 9bd1d810219c9875 ]---

Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
 drivers/net/bonding/bond_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 19eb990..ace105a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1870,6 +1870,8 @@ static int __bond_release_one(struct net_device *bond_dev,
 		dev_set_mac_address(slave_dev, &addr);
 	}
 
+	bond_remove_proc_entry(bond);
+
 	dev_set_mtu(slave_dev, slave->original_mtu);
 
 	slave_dev->priv_flags &= ~IFF_BONDING;
-- 
1.8.3.1

             reply	other threads:[~2015-07-13 19:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 18:57 clsoto [this message]
2015-07-13 21:05 ` [PATCH] net/bonding: Add function bond_remove_proc_entry at __bond_release_one Nikolay Aleksandrov
2015-07-13 21:10   ` Nikolay Aleksandrov
2015-07-15 17:49     ` Nikolay Aleksandrov
2015-07-15 19:52       ` [PATCH net] bonding: fix destruction of bond with devices different from arphrd_ether Nikolay Aleksandrov
2015-07-15 21:01         ` Carol Soto
2015-07-15 22:39         ` Eric W. Biederman
2015-07-15 22:54           ` Nikolay Aleksandrov
2015-07-15 22:58             ` Carol Soto
2015-07-16  6:14             ` Veaceslav Falico
2015-07-20 19:56         ` David Miller

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=1436813848-30995-1-git-send-email-clsoto@linux.vnet.ibm.com \
    --to=clsoto@linux.vnet.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=gospo@cumulusnetworks.com \
    --cc=j.vosburgh@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).