Bug 8789
Summary: | Error inserting ipt_LOG (mod_path): Device or resource busy | ||
---|---|---|---|
Product: | Networking | Reporter: | Artem S. Tashkinov (aros) |
Component: | Netfilter/Iptables | Assignee: | networking_netfilter-iptables (networking_netfilter-iptables) |
Status: | CLOSED CODE_FIX | ||
Severity: | blocking | CC: | bunk |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.22 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Artem S. Tashkinov
2007-07-21 00:49:30 UTC
Reply-To: akpm@linux-foundation.org On Sat, 21 Jul 2007 00:44:08 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=8789 > > Summary: Error inserting ipt_LOG (mod_path): Device or resource > busy A 2.6.12 -> 2.6.22 regression. > Product: Networking > Version: 2.5 > KernelVersion: 2.6.22 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: blocking > Priority: P1 > Component: Netfilter/Iptables > AssignedTo: networking_netfilter-iptables@kernel-bugs.osdl.org > ReportedBy: t.artem@mailcity.com > > > Most recent kernel where this bug did not occur: 2.6.21.6 > Distribution: Fedora 7 > Hardware Environment: irrelevant > Software Environment: Fedora 7 + vanilla kernel 2.6.22 > Problem Description: > > After I upgraded to 2.6.22 kernel, my iptables configuration no longer works > and I get the above error message. When the error occurs I have these > iptables > modules loaded: > > [root@localhost sysconfig]# lsmod | egrep "x._|ipt" | awk '{print $1}' > xt_limit > xt_tcpudp > xt_pkttype > ipt_ULOG > xt_multiport > iptable_filter > ip_tables > x_tables > > [root@localhost sysconfig]# modprobe ipt_LOG > FATAL: Error inserting ipt_LOG > (/lib/modules/2.6.22-k8l/kernel/net/ipv4/netfilter/ipt_LOG.ko): Device or > resource busy > > If I remove all iptables modules then I can successfully modprobe ipt_LOG. > > Steps to reproduce: boot the PC or # service iptables start Packages' versions: module-init-tools-3.3-0.pre11.1.0.fc7 gcc-4.2.1 vanilla binutils-2.17.50.0.12-4 Andrew Morton wrote:
> On Sat, 21 Jul 2007 00:44:08 -0700 (PDT) bugme-daemon@bugzilla.kernel.org
> wrote:
>
>
>>http://bugzilla.kernel.org/show_bug.cgi?id=8789
>>
>> Summary: Error inserting ipt_LOG (mod_path): Device or resource
>> busy
>
>
> A 2.6.12 -> 2.6.22 regression.
Crap, that was my fault.
T., can you please test whether this patch fixes it?
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 031bfa4..984e9c6 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -196,10 +196,8 @@ static int __init ebt_log_init(void)
ret = ebt_register_watcher(&log);
if (ret < 0)
return ret;
- ret = nf_log_register(PF_BRIDGE, &ebt_log_logger);
- if (ret < 0 && ret != -EEXIST)
- ebt_unregister_watcher(&log);
- return ret;
+ nf_log_register(PF_BRIDGE, &ebt_log_logger);
+ return 0;
}
static void __exit ebt_log_fini(void)
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 9411db6..6fec352 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -308,12 +308,8 @@ static int __init ebt_ulog_init(void)
else if ((ret = ebt_register_watcher(&ulog)))
sock_release(ebtulognl->sk_socket);
- if (nf_log_register(PF_BRIDGE, &ebt_ulog_logger) < 0) {
- printk(KERN_WARNING "ebt_ulog: not logging via ulog "
- "since somebody else already registered for PF_BRIDGE\n");
- /* we cannot make module load fail here, since otherwise
- * ebtables userspace would abort */
- }
+ if (ret == 0)
+ nf_log_register(PF_BRIDGE, &ebt_ulog_logger);
return ret;
}
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 5937ad1..127a5e8 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -479,10 +479,8 @@ static int __init ipt_log_init(void)
ret = xt_register_target(&ipt_log_reg);
if (ret < 0)
return ret;
- ret = nf_log_register(PF_INET, &ipt_log_logger);
- if (ret < 0 && ret != -EEXIST)
- xt_unregister_target(&ipt_log_reg);
- return ret;
+ nf_log_register(PF_INET, &ipt_log_logger);
+ return 0;
}
static void __exit ipt_log_fini(void)
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index b05327e..6ab9900 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -493,10 +493,8 @@ static int __init ip6t_log_init(void)
ret = xt_register_target(&ip6t_log_reg);
if (ret < 0)
return ret;
- ret = nf_log_register(PF_INET6, &ip6t_logger);
- if (ret < 0 && ret != -EEXIST)
- xt_unregister_target(&ip6t_log_reg);
- return ret;
+ nf_log_register(PF_INET6, &ip6t_logger);
+ return 0;
}
static void __exit ip6t_log_fini(void)
Your patch has fixed this problem. Thank you. bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=8789 > > > > > > ------- Comment #4 from t.artem@mailcity.com 2007-07-24 00:43 ------- > Your patch has fixed this problem. Thank you. Thanks for testing, I'll push it upstream and to lastest -stable (bug was introduced in 2.6.22). The patch from this bug is now in Linus' tree. |