Bug 684643 - WARNING: at drivers/net/bonding/bond_main.c:5511 bonding_exit()
Summary: WARNING: at drivers/net/bonding/bond_main.c:5511 bonding_exit()
Keywords:
Status: CLOSED DUPLICATE of bug 704426
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Andy Gospodarek
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-14 05:02 UTC by Mark Wu
Modified: 2018-11-14 14:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-13 16:18:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mark Wu 2011-03-14 05:02:56 UTC
Description of problem:

When we remove the driver using rmmod, the stack trace is given like this.
Mar 11 11:18:12 build kernel: WARNING: at drivers/net/bonding/bond_main.c:5511 bonding_exit()
Mar 11 11:18:12 build kernel: Call Trace:
Mar 11 11:18:12 build avahi-daemon[4651]: Withdrawing address record for
192.168.1.2 on bond5.
Mar 11 11:18:12 build kernel:  [<ffffffff800a8617>]
sys_delete_module+0x196/0x1c5
Mar 11 11:18:12 build kernel:  [<ffffffff8005d28d>] tracesys+0xd5/0xe0 Mar 11 11:18:12 build kernel:

This problem should be caused by only unblock operation is added in functions bonding_store_active_slave and bonding_store_primary. So, if module is removed after these operations , the work counter stays minus and the inconsistency appears.


Version-Release number of selected component (if applicable):
2.6.18-238.6.1.el5 

How reproducible:

Steps to Reproduce:
rmmod bonding
  
Actual results:
Get warning on: WARN_ON(atomic_read(&netpoll_block_tx));

Expected results:
No warning when removed the driver

Additional info:

Comment 2 Mark Wu 2011-03-14 05:07:19 UTC
It looks it need add block_netpoll_tx in functions bonding_store_active_slave and bonding_store_primary too

Comment 4 Mark Wu 2011-03-15 07:48:52 UTC
Oshiro-san,
The test kernel is available at:
https://brewweb.devel.redhat.com/taskinfo?taskID=3178244

The test patch is:

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 6ffcdc6..37868bc 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1097,6 +1097,7 @@ static ssize_t bonding_store_primary(struct class_device *cd, const char *buf, s
        struct bonding *bond = to_bond(cd);

        rtnl_lock();
+       block_netpoll_tx();
        read_lock(&bond->lock);
        write_lock_bh(&bond->curr_slave_lock);

@@ -1258,6 +1259,7 @@ static ssize_t bonding_store_active_slave(struct class_device *cd, const char *b
        struct bonding *bond = to_bond(cd);

        rtnl_lock();
+       block_netpoll_tx();
        read_lock(&bond->lock);
        write_lock_bh(&bond->curr_slave_lock);

Comment 6 Andy Gospodarek 2011-07-13 16:18:57 UTC

*** This bug has been marked as a duplicate of bug 704426 ***

Comment 7 Andy Gospodarek 2011-07-13 16:19:51 UTC
This is fixed in 2.6.18-266.el5.


Note You need to log in before you can comment on or make changes to this bug.