Hide Forgot
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:
It looks it need add block_netpoll_tx in functions bonding_store_active_slave and bonding_store_primary too
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);
*** This bug has been marked as a duplicate of bug 704426 ***
This is fixed in 2.6.18-266.el5.