Date: Sun, 4 Oct 2015 23:31:22 +0300 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: Julian Kornberger <juliank@tzi.de>, "net@freebsd.org" <net@freebsd.org> Subject: Re: Page fault after destroying/reconfiguring GRE interface Message-ID: <56118C9A.7080303@FreeBSD.org> In-Reply-To: <56106056.7040006@tzi.de> References: <56106056.7040006@tzi.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iiD4qLXNv0UkHNqWAkBqPiPCmd9pbWjpD Content-Type: multipart/mixed; boundary="------------050806010300050009010003" This is a multi-part message in MIME format. --------------050806010300050009010003 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 04.10.2015 02:10, Julian Kornberger wrote: > my machine (FreeBSD 10.2) crashes sometimes after I destroy or > reconfigure a GRE interface. You find my crash dumps at: > http://www.informatik.uni-bremen.de/~juliank/crash/ >=20 > [...] > #7 0xffffffff80d307f2 in calltrap () > at /usr/src/sys/amd64/amd64/exception.S:236 > #8 0xffffffff81e125eb in in_gre_encapcheck (m=3D0xfffff8001ef81d00, of= f=3D20, > proto=3D47, arg=3D0xfffff800613f3000) > at /usr/src/sys/modules/if_gre/../../netinet/ip_gre.c:112 > #9 0xffffffff80a75142 in encap4_input (m=3D0xfffff8001ef81d00, off=3D2= 0) > at /usr/src/sys/netinet/ip_encap.c:149 > #10 0xffffffff80a77f57 in ip_input (m=3D0xfffff8001ef81d00) > at /usr/src/sys/netinet/ip_input.c:734 > [...] >=20 > Any ideas? Can you test this patch? --=20 WBR, Andrey V. Elsukov --------------050806010300050009010003 Content-Type: text/x-patch; name="ip_encap.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ip_encap.diff" Index: sys/netinet/ip_encap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/netinet/ip_encap.c (revision 287393) +++ sys/netinet/ip_encap.c (working copy) @@ -181,7 +181,6 @@ encap4_input(struct mbuf *m, int off) match =3D ep; } } - mtx_unlock(&encapmtx); =20 if (match) { /* found a match, "match" has the best one */ @@ -191,8 +190,10 @@ encap4_input(struct mbuf *m, int off) (*psw->pr_input)(m, off); } else m_freem(m); + mtx_unlock(&encapmtx); return; - } + } else + mtx_unlock(&encapmtx); =20 /* last resort: inject to raw socket */ rip_input(m, off); @@ -255,12 +256,15 @@ encap6_input(struct mbuf **mp, int *offp, int prot psw =3D (const struct ip6protosw *)match->psw; if (psw && psw->pr_input) { encap_fillarg(m, match); - return (*psw->pr_input)(mp, offp, proto); + prio =3D (*psw->pr_input)(mp, offp, proto); } else { m_freem(m); - return IPPROTO_DONE; + prio =3D IPPROTO_DONE; } - } + mtx_unlock(&encapmtx); + return (prio); + } else + mtx_unlock(&encapmtx); =20 /* last resort: inject to raw socket */ return rip6_input(mp, offp, proto); --------------050806010300050009010003-- --iiD4qLXNv0UkHNqWAkBqPiPCmd9pbWjpD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWEYyaAAoJEAHF6gQQyKF6Z3EH/10X2yd1QqdkR6RFshgnAOIV pYFLkxKrwF/rp5oK/+VJXQAVTNChgN9uhVe0Aym3aXv20T1WsTXQlBQpCtbB2/9I 2TIbWrR/z6b+P5Qq8JFEYXTRaKuSCOD50pr/3o/uwT8KbdOuJ15w4VucwOgz2kHY 76W/6+xZ1S779wQU4ZV/VaX+tcijShIdwVZRRTqOD2LwWekf2ZxTRC74Ntm1BHw0 GBfL4d/c2bgPQ3An0f3cxaL5EYSH7X2RqHngxg+jnzrzLyYxqO82OoubpS5aeXyO GfzlLrzx0pCcj0FDzyfyyvG+G+Vr91TS+68l4nR7o25qzVNpm1cx4qpvqzbTVKA= =/f12 -----END PGP SIGNATURE----- --iiD4qLXNv0UkHNqWAkBqPiPCmd9pbWjpD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56118C9A.7080303>