kernel panic with rpc.patch
PATCH 1/1 kernel panic with rpc.patch
Some useless __MOD_INC_USE_COUNT macros make rpc patch panic on boot. The below removes them. Boot tested.
This fixes bugzilla #50
Phil
rpc/linux/net/ipv4/netfilter/ipt_rpc.c +0 -4
@@ -394,10 +394,6 @@ {int port; -DEBUGP ("incrementing usage counts\n" ); -__MOD_INC_USE_COUNT (ip_conntrack_rpc_udp); -__MOD_INC_USE_COUNT (ip_conntrack_rpc_tcp); -/* If no port given, default to standard RPC port */ if (ports[0 ] ==0 ) ports[0 ] =RPC_PORT ;
Patrick McHardy
AppliedQuoted 6 lines · Phil Oester
Some useless
__MOD_INC_USE_COUNTmacros make rpc patch panic on boot. The below removes them. Boot tested.This fixes bugzilla #50
Applied, but wondering on second thought. There are still two __MOD_DEC_USE_COUNT left, and __MOD_INC_USE_COUNT does actually do something :) Why are they useless ?
Regards
Patrick
Quoted 25 lines
Phil
------------------------------------------------------------------------
diff -ru
pom-orig/rpc/linux/net/ipv4/netfilter/ipt_rpc.cpom-new/rpc/linux/net/ipv4/netfilter/ipt_rpc.crpc/linux/net/ipv4/netfilter/ipt_rpc.c +0
-4@@ -394,10 +394,6 @@ {int port; -DEBUGP ("incrementing usage counts\n" ); -__MOD_INC_USE_COUNT (ip_conntrack_rpc_udp); -__MOD_INC_USE_COUNT (ip_conntrack_rpc_tcp); -/* If no port given, default to standard RPC port */ if (ports[0 ] ==0 ) ports[0 ] =RPC_PORT ;
Quoted 8 lines · Patrick McHardy
Quoted 2 lines · Phil Oester
Some useless
__MOD_INC_USE_COUNTmacros make rpc patch panic on boot. The below removes them. Boot tested.Applied, but wondering on second thought. There are still two
__MOD_DEC_USE_COUNTleft, and__MOD_INC_USE_COUNTdoes actually do something :) Why are they useless ?
Yes, perhaps 'useless' is the wrong word -- they do something, but something which is deprecated and in 2.6 netfilter nonexistent. And following davem's policy of no refcounts for network drivers [1], it seems to make sense.
Agreed, however, that removing the INC without also removing the DEC is sloppy. Attached find a patch to do so.
Phil
[1] http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.3/0403.html
rpc/linux/net/ipv4/netfilter/ipt_rpc.c +0 -4
@@ -412,10 +412,6 @@ {DEBUGP ("unregistering match\n" );ipt_unregister_match (&rpc_match); - -DEBUGP ("decrementing usage counts\n" ); -__MOD_DEC_USE_COUNT (ip_conntrack_rpc_tcp); -__MOD_DEC_USE_COUNT (ip_conntrack_rpc_udp); }
Patrick McHardy
AppliedQuoted 8 lines · Phil Oester
Quoted 5 lines · Patrick McHardy
Applied, but wondering on second thought. There are still two
__MOD_DEC_USE_COUNTleft, and__MOD_INC_USE_COUNTdoes actually do something :) Why are they useless ?
Quoted 8 lines
Yes, perhaps 'useless' is the wrong word -- they do something, but something which is deprecated and in 2.6 netfilter nonexistent. And following davem's policy of no refcounts for network drivers [1], it
seems to make sense.Agreed, however, that removing the INC without also removing the DEC is sloppy. Attached find a patch to do so.
Thanks, applied.
Regards
Patrick