Re: BUG when unloading bonding on 2.6.29-rc7-git3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: John Dykstra
Date: Tuesday, March 10, 2009 - 4:23 pm

On Tue, 2009-03-10 at 22:15 +0200, Thomas Backlund wrote:

Beyond the null pointer reference in ipv6_sysctl_net_exit caught in the
report, there is at least one further place where ipv6 module exit
breaks with disable=1. 

I've tested this patch with both values of the module parameter, and
with IPv6 built into the kernel rather than as a module.  I cannot
guarantee that something else doesn't break when modules call into an
unitialized ipv6.

---

ipv6:  Fix BUG when disabled ipv6 module is unloaded

Do not try to "uninitialize" ipv6 if its initialization had been skipped
because module parameter disable=1 had been specified.

Reported-by:  Thomas Backlund <tmb@mandriva.org>
Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
---
net/ipv6/af_inet6.c |    3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index da944ec..a0f1798 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1192,6 +1192,9 @@ module_init(inet6_init);

static void __exit inet6_exit(void)
{
+       if (disable_ipv6)
+               return;
+
        /* First of all disallow new sockets creation. */
        sock_unregister(PF_INET6);
        /* Disallow any further netlink messages */
--
1.5.4.3


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
BUG when unloading bonding on 2.6.29-rc7-git3, Thomas Backlund, (Tue Mar 10, 1:15 pm)
Re: BUG when unloading bonding on 2.6.29-rc7-git3, Jay Vosburgh, (Tue Mar 10, 1:38 pm)
Re: BUG when unloading bonding on 2.6.29-rc7-git3, John Dykstra, (Tue Mar 10, 4:23 pm)
Re: BUG when unloading bonding on 2.6.29-rc7-git3, Brian Haley, (Wed Mar 11, 7:47 am)
Re: BUG when unloading bonding on 2.6.29-rc7-git3, David Miller, (Wed Mar 11, 9:22 am)