Skip to contentSkip to conversation

netfilter: allow nf_tproxy_core module to be removed

PATCH In review Jiri Pirko 5 participants 6 messages Jun 23, 2010 – Jun 29, 2010

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 netfilter: allow nf_tproxy_core module to be removed

net/netfilter/nf_tproxy_core.c +5 -0
index 5490fc3..ec6737c 100644
@@ -89,7 +89,12 @@ static int __init nf_tproxy_init(void)
 	return 0;
 }
 
+static void __exit nf_tproxy_exit(void)
+{
+}
+
 module_init(nf_tproxy_init);
+module_exit(nf_tproxy_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Krisztian Kovacs");
maintainer
#1 lore raw
Quoted 5 lines · Jiri Pirko
net/netfilter/nf_tproxy_core.c +0 -0
index 5490fc3..ec6737c 100644

net/netfilter/nf_tproxy_core.c static int __init nf_tproxy_init(void) · line 97

Quoted 9 lines
net/netfilter/nf_tproxy_core.c +5 -0
@@ -89,7 +89,12 @@ static int __init nf_tproxy_init(void)
 	return 0;
 }
 
+static void __exit nf_tproxy_exit(void)
+{
+}
+
 module_init(nf_tproxy_init);
+module_exit(nf_tproxy_exit);

tproxy assigns skb->destructor, what prevents module unload while such skbs may still be around?

maintainer
#2 lore raw

From: Florian Westphal <[email protected]>
Date: Wed, 23 Jun 2010 20:46:11 +0200

Quoted 2 lines

tproxy assigns skb->destructor, what prevents module unload while such skbs may still be around?

The only reference to nf_tproxy_core.ko is for the symbol, "nf_tproxy_assign_sock". xt_TPROXY.c, which references this symbol, thus creates a symbol dependency on this module, so xt_TPROXY.o needs to unload before nf_tproxy_core.ko can unload, and xt_TPROXY.o has it's own manner for handling module references properly.

#3 lore raw
Quoted 4 lines · David Miller

From: Florian Westphal <[email protected]>
Date: Wed, 23 Jun 2010 20:46:11 +0200

Quoted 9 lines
Quoted 3 lines

tproxy assigns skb->destructor, what prevents module unload while such skbs may still be around?

The only reference to nf_tproxy_core.ko is for the symbol, "nf_tproxy_assign_sock". xt_TPROXY.c, which references this symbol, thus creates a symbol dependency on this module, so xt_TPROXY.o needs to unload before nf_tproxy_core.ko can unload, and xt_TPROXY.o has it's own manner for handling module references properly.

I don't see anything waiting for skbs in flight using the tproxy destructor in either xt_TPROXY or nf_tproxy_core though, so I think Florian is correct.

#4 lore raw

Hi,

Quoted 16 lines · Patrick McHardy
Quoted 7 lines · David Miller

From: Florian Westphal <[email protected]>
Date: Wed, 23 Jun 2010 20:46:11 +0200

Quoted 3 lines

tproxy assigns skb->destructor, what prevents module unload while such skbs may
still be around?

Quoted 7 lines

The only reference to nf_tproxy_core.ko is for the symbol, "nf_tproxy_assign_sock".
xt_TPROXY.c, which references this symbol, thus creates a symbol dependency on this
module, so xt_TPROXY.o needs to unload before nf_tproxy_core.ko can unload, and
xt_TPROXY.o has it's own manner for handling module references properly.

Quoted 3 lines

I don't see anything waiting for skbs in flight using the tproxy destructor in either xt_TPROXY or nf_tproxy_core though, so I think Florian is correct.

Yes, I think Florian and Patrick's right. Right now there's nothing preventing xt_TPROXY and nf_tproxy_core from being removed while there are skbs in flight with the tproxy destructor set.

Signature · 1 line
KOVACS Krisztian
maintainer
#5 lore raw
In reply to Patrick McHardy

From: Patrick McHardy <[email protected]>
Date: Thu, 24 Jun 2010 17:29:29 +0200

Quoted 20 lines
Quoted 9 lines · David Miller

From: Florian Westphal <[email protected]>
Date: Wed, 23 Jun 2010 20:46:11 +0200

Quoted 4 lines

tproxy assigns skb->destructor, what prevents module unload while such skbs may
still be around?

Quoted 9 lines

The only reference to nf_tproxy_core.ko is for the symbol, "nf_tproxy_assign_sock".
xt_TPROXY.c, which references this symbol, thus creates a symbol dependency on this
module, so xt_TPROXY.o needs to unload before nf_tproxy_core.ko can unload, and
xt_TPROXY.o has it's own manner for handling module references properly.

Quoted 3 lines

I don't see anything waiting for skbs in flight using the tproxy destructor in either xt_TPROXY or nf_tproxy_core though, so I think Florian is correct.

Ok.