usagi/kernel/linux26/net/netfilter nf_conntrack_core.c usagi/kernel/linux26/include/linux/netfilter nf_conntrack.h
| Newsgroups | gmane.linux.ipv6.usagi.cvs |
|---|---|
| Message-ID | <[email protected]> |
kozakai 2004/03/24 03:18:34 JST
Modified files: (Branch: bCONNTRACK-20040319)
kernel/linux26/net/netfilter nf_conntrack_core.c
kernel/linux26/include/linux/netfilter nf_conntrack.h
Log:
changed logic of destroying slab cache.
before: destroying when counter "use" is zero.
"use" is the number of nf_conn from slab + modules which need one.
The problem is that kmem_cache_destroy() can't be called in interrupt.
But nf_conn may be free when its timer is expired. Therefore, for
example, kernel panic is occurred in the case that
1. load ftp helper module.
2. create ftp connection.
3. unload ftp helper module.
4. timer of nf_conn is expired, free nf_conn, and "use" become
zero.
after: destroying when all module which need its slab are unloaded.
Before calling kmem_cache_destroy(), all nf_conn which is allocated from
its slab is reallocated. In this case, new nf_conn is allocated from
other slab, its contents are copyed from old nf_conn, and all
reference to old nf_conn is changed to it.
Revision Changes Path
1.1.4.4 +311 -132 usagi/kernel/linux26/net/netfilter/Attic/nf_conntrack_core.c
1.1.4.3 +3 -1 usagi/kernel/linux26/include/linux/netfilter/Attic/nf_conntrack.h