lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [2.5.69-mm1] kernel BUG at include/linux/module.h:284!
From
Date
On Tue, 2003-05-06 at 05:44, Kimmo Sundqvist wrote:
> Got one like this...
...
> Call Trace:
> [<f8d7d060>] rawv6_protosw+0x0/0x20 [ipv6]
> [<c0232b51>] sock_create+0x149/0x264
> [<f8d7f848>] __icmpv6_socket+0x0/0x8 [ipv6]

Crap. Well, two problems. Attached is a fix for the first
one, the second one is harder.

Arnaldo, ipv6 creates a socket of it's own type during
module init, try_module_get() on the current module fails
during module load... do you see the problem?

Rusty, you said you were working on a solution for modules
that call themselves during their own init?

--
David S. Miller <davem@redhat.com>
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1074 -> 1.1075
# net/ipv6/af_inet6.c 1.32 -> 1.33
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/06 davem@nuts.ninka.net 1.1075
# [IPV6]: Kill spurious module_{get,put}().
# --------------------------------------------
#
diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c Tue May 6 06:16:05 2003
+++ b/net/ipv6/af_inet6.c Tue May 6 06:16:05 2003
@@ -111,7 +111,6 @@
#ifdef INET_REFCNT_DEBUG
atomic_dec(&inet6_sock_nr);
#endif
- module_put(THIS_MODULE);
}

static __inline__ kmem_cache_t *inet6_sk_slab(int protocol)
@@ -243,11 +242,6 @@
atomic_inc(&inet6_sock_nr);
atomic_inc(&inet_sock_nr);
#endif
- if (!try_module_get(THIS_MODULE)) {
- inet_sock_release(sk);
- return -EBUSY;
- }
-
if (inet->num) {
/* It assumes that any protocol which allows
* the user to assign a number at socket
@@ -259,7 +253,6 @@
if (sk->prot->init) {
int err = sk->prot->init(sk);
if (err != 0) {
- module_put(THIS_MODULE);
inet_sock_release(sk);
return err;
}
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:2.524 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site