Re: kernel OOPS

Nick Fedchik <nick-UvdXiu2sajOKBXSJ/[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Hi ALL!
In both cases it was inside the nf_reinject() function.
linux/net/core/netfilter.c

So my prop is to add a lot of debugging messages inside the nf_reinject()
then recompile the kernel and test new kernel (or module, if it so).


On Tuesday 22 July 2003 15:28, josh wrote:
> On Tue, 22 Jul 2003, Andriy T. Yanko wrote:
> > Hi.
> > I already post my OOPS message.
> > And this bug is look seem as my and it maybe in ip_queue  kerbel
> > modulet:
>
> Hi Andriy,
> I saw your post. Unfortunetly my ksymoops reading skills are a little
> rusty. I was not sure that the problems were related. In any case did
> you make any progress with this problem?

Case 1:
Code;  c029b208 <nf_reinject+138/270>
00000000 <_EIP>:
Code;  c029b208 <nf_reinject+138/270>   <=====
   0:   8b 50 08                  mov    0x8(%eax),%edx   <=====
Code;  c029b20b <nf_reinject+13b/270>
   3:   85 d2                     test   %edx,%edx
Code;  c029b20d <nf_reinject+13d/270>
   5:   74 11                     je     18 <_EIP+0x18>
Code;  c029b20f <nf_reinject+13f/270>
   7:   f0 ff 8a f0 00 00 00      lock decl 0xf0(%edx)
Code;  c029b216 <nf_reinject+146/270>
   e:   0f 94 c0                  sete   %al
Code;  c029b219 <nf_reinject+149/270>
  11:   84 c0                     test   %al,%al
Code;  c029b21b <nf_reinject+14b/270>
  13:   75 00                     jne    15 <_EIP+0x15>

Case 2:
Code;  c01faeef <nf_reinject+df/1e0>
00000000 <_EIP>:
Code;  c01faeef <nf_reinject+df/1e0>   <=====
   0:   8b 50 08                  mov    0x8(%eax),%edx   <=====
Code;  c01faef2 <nf_reinject+e2/1e0>
   3:   85 d2                     test   %edx,%edx
Code;  c01faef4 <nf_reinject+e4/1e0>
   5:   74 0d                     je     14 <_EIP+0x14>
Code;  c01faef6 <nf_reinject+e6/1e0>
   7:   ff 8a e8 00 00 00         decl   0xe8(%edx)
Code;  c01faefc <nf_reinject+ec/1e0>
   d:   0f 94 c0                  sete   %al
Code;  c01faeff <nf_reinject+ef/1e0>
  10:   84 c0                     test   %al,%al
Code;  c01faf01 <nf_reinject+f1/1e0>
  12:   75 2c                     jne    40 <_EIP+0x40>

So as I understand this is a case of jump to illegal address
(Invalid increment of instruction pointer?)

Here the piece of patch for nf_reinject() from ebtables-brnf_vs_2.4.21.diff

@@ -528,9 +551,9 @@ void nf_reinject(struct sk_buff *skb, st

        if (verdict == NF_ACCEPT) {
                verdict = nf_iterate(&nf_hooks[info->pf][info->hook],
-                                    &skb, info->hook,
+                                    &skb, info->hook,
                                     info->indev, info->outdev, &elem,
-                                    info->okfn);
+                                    info->okfn, INT_MIN);
        }

        switch (verdict) {
@@ -539,20 +562,27 @@ void nf_reinject(struct sk_buff *skb, st
                break;

        case NF_QUEUE:
-               nf_queue(skb, elem, info->pf, info->hook,
+               nf_queue(skb, elem, info->pf, info->hook,
                         info->indev, info->outdev, info->okfn);
                break;
-
-       case NF_DROP:
-               kfree_skb(skb);
-               break;
        }
        br_read_unlock_bh(BR_NETPROTO_LOCK);

        /* Release those devices we held, or Alexey will kill me. */
        if (info->indev) dev_put(info->indev);
        if (info->outdev) dev_put(info->outdev);
-
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+       if (skb->nf_bridge) {
+               if (skb->nf_bridge->physindev)
+                       dev_put(skb->nf_bridge->physindev);
+               if (skb->nf_bridge->physoutdev)
+                       dev_put(skb->nf_bridge->physoutdev);
+       }
+#endif
+
+       if (verdict == NF_DROP)
+               kfree_skb(skb);
+
        kfree(info);
        return;
 }


2 Bart: Any ideas?
May be it's here:
...
   if (skb->nf_bridge->physindev)
            dev_put(skb->nf_bridge->physindev);
   if (skb->nf_bridge->physoutdev)
            dev_put(skb->nf_bridge->physoutdev);
...

-- 
Best regards, Nick Fedchik
FNM3-RIPE(-UANIC) http://www.fedchik.org.ua



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.