Hi, Alexander,

I'm seeing the following backtrace with kernel trap 12 at fault address
of 0xf4, and the backtrace is:

arpintr() at arpintr+0x85e
netisr_dispatch_src() at netisr_dispatch_src+0x61

I have then read the if_ether.c as of r286525.

In line 611, la is initialized as NULL;

In line 751, the test ifp->if_addrlen != ah->ar_hln takes the true path,
then we would reach line 752:

        LLE_WUNLOCK(la);

And that would cause the panic.

Take a more closer look, it seems that we can't reach 'match:' with a
known llentry and can assert la == NULL in line 752.  The unlock seems
to be unneeded there and should be removed.

Do the following patch look sane to you?

Index: sys/netinet/if_ether.c
===================================================================
--- sys/netinet/if_ether.c      (revision 286847)
+++ sys/netinet/if_ether.c      (working copy)
@@ -749,7 +749,6 @@ match:
        }

        if (ifp->if_addrlen != ah->ar_hln) {
-               LLE_WUNLOCK(la);
                ARP_LOG(LOG_WARNING, "from %*D: addr len: new %d, "
                    "i/f %d (ignored)\n", ifp->if_addrlen,
                    (u_char *) ar_sha(ah), ":", ah->ar_hln,


Cheers,
-- 
Xin LI <delp...@delphij.net>    https://www.delphij.net/
FreeBSD - The Power to Serve!           Live free or die

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to