Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2015 16:10:25 -0700
From:      Xin Li <delphij@delphij.net>
To:        "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Panic with recent -CURRENT
Message-ID:  <55D269E1.8000307@delphij.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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 <delphij@delphij.net>    https://www.delphij.net/
FreeBSD - The Power to Serve!           Live free or die


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.7 (FreeBSD)

iQIcBAEBCgAGBQJV0mnmAAoJEJW2GBstM+nsV+8P/3pCS7xDQc9u0dyS4PafYAPf
l3Eibhlr62ppO88gadPo/FJlQRGQV08zIdE8pzx0Ewb+aa4LJpLAWF3G6fKmcnXS
FSv/iBr3yBCYBxhm5fCTzsXEtt61yKtXQWR0dyFLjMJ0xc6m9Gm0L6LXdMNn2y9W
2VX32h8IygB2ihM4X2PtjR/r/WLFAWND6Jch22loIsoyGHy46iUxLkc4rPO1S6O5
25If8Qivp9RvBuPztIqn4Ak1FHlcy1tpdbt32T3N2TUP0A/uenJCNxxmVCH5fDa6
jZ/5VoQTLuT582e6HgK3NW417sj5Ue9h24bj5p1i5fOvGyZrSZ9JPyGy0qVQpzrl
wxq39nRWQdt3hamitypllB+f0VSo823NaQdJAvpq6aiBVklummCPl4/dD7lW14Vd
zpdo8diIxtdzNdriIpYJSg9pesbhlV9xcYZKWEZoiOKlK7Ruvri7gfq1uOXQTiFM
CfXBbLXKIEXoyGqLJvywTAglOvnNiCQmVlgWonfRyKv54XnDGpj1yWhKJmQdrbeJ
vWenmXGILhPL0uB3D/jT8Xol3v6c49SRT9rZfj/fCaCp7nvJXtkQOHlwiY4IdhwJ
midKQDKd6cB2kur6MPMmW27P8e6kblB+dDe3iMK+TWZcWi/m7F3LYORAwncz88Hf
uDK4O37QuoLf3sV6MK2S
=m6Ld
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55D269E1.8000307>