Date: Fri, 5 Sep 2014 14:15:15 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Garrett Cooper <yaneurabeya@gmail.com> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Mateusz Guzik <mjguzik@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org> Subject: Re: svn commit: r271182 - head/sys/kern Message-ID: <CAJ-Vmok9T_DXH=pPt625xQ2J2qoMYckY6aKyFj8uvBsceHUiwA@mail.gmail.com> In-Reply-To: <FF7C656B-2A15-4355-9821-7D2A29C2AF09@gmail.com> References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> <FF7C656B-2A15-4355-9821-7D2A29C2AF09@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I'm building a vimage kernel now to at least compile test a fix. Thanks, -a On 5 September 2014 12:59, Garrett Cooper <yaneurabeya@gmail.com> wrote: > >> On Sep 5, 2014, at 12:54, Mateusz Guzik <mjguzik@gmail.com> wrote: >> >>> On Fri, Sep 05, 2014 at 07:50:18PM +0000, Gleb Smirnoff wrote: >>> Author: glebius >>> Date: Fri Sep 5 19:50:18 2014 >>> New Revision: 271182 >>> URL: http://svnweb.freebsd.org/changeset/base/271182 >>> >>> Log: >>> Set vnet context before accessing V_socket_hhh[]. >>> >>> Submitted by: "Hiroo Ono (=E5=B0=8F=E9=87=8E=E5=AF=9B=E7=94=9F)" <h= iroo.ono+freebsd gmail.com> >>> >>> Modified: >>> head/sys/kern/uipc_socket.c >>> >>> Modified: head/sys/kern/uipc_socket.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=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/sys/kern/uipc_socket.c Fri Sep 5 19:00:30 2014 (r271181= ) >>> +++ head/sys/kern/uipc_socket.c Fri Sep 5 19:50:18 2014 (r271182= ) >>> @@ -3265,9 +3265,11 @@ filt_soread(struct knote *kn, long hint) >>> return 1; >>> } >>> >>> + CURVNET_SET(so->so_vnet); >>> if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) >>> /* This hook returning non-zero indicates an event, not error */ >>> return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); >>> + CURVNET_RESTORE(); >> >> should not this be something like: >> error =3D hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); >> CURVNET_RESTORE(); >> return (error); >> ? > > Probably :/.. > > >>> return (0); >>> } >>> @@ -3294,8 +3296,10 @@ filt_sowrite(struct knote *kn, long hint >>> SOCKBUF_LOCK_ASSERT(&so->so_snd); >>> kn->kn_data =3D sbspace(&so->so_snd); >>> >>> + CURVNET_SET(so->so_vnet); >>> if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) >>> hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); >>> + CURVNET_RESTORE(); >>> >>> if (so->so_snd.sb_state & SBS_CANTSENDMORE) { >>> kn->kn_flags |=3D EV_EOF; >> >> -- >> Mateusz Guzik <mjguzik gmail.com> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmok9T_DXH=pPt625xQ2J2qoMYckY6aKyFj8uvBsceHUiwA>