From owner-svn-src-head@FreeBSD.ORG Fri Sep 5 21:15:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 299A7E58; Fri, 5 Sep 2014 21:15:17 +0000 (UTC) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA95E1E70; Fri, 5 Sep 2014 21:15:16 +0000 (UTC) Received: by mail-qg0-f41.google.com with SMTP id i50so12647659qgf.14 for ; Fri, 05 Sep 2014 14:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=o5nc5cvIBE5ecWtMnvefIA1DYXOrDJcIVN6PYKMo9nM=; b=cb8uPa2304Hrf//4ycynjwwXb3VWAPEsTjKpkoTsg1y2cFqorzD9shKSMH1IZsFocj 8b4HqHSLXHuOmB7QnaZio/CmFc/qddqJEfruPyoXWkYabfUPBHgt9fz8Bytta7ES2BOb f2ey5K90B90B+FWoP9w6WvfpiTaK2mR0Ijoq0x9m6PAB/pQXfu/u84D9eiNv2CYLyWIz a2ICi5nH1EGUmwNbzQoH1JNdYzPdHbzbQwEH3ijSRn4KRifrrYWPUWAn7DN8ogcp5gE5 JrBLDKHJPbRdWGdekdMsDYp1Twuf9jZFN7EUtstJd4nEQRFTbvGvFzgvY9cTPTi9i6Q1 6YtQ== MIME-Version: 1.0 X-Received: by 10.224.75.73 with SMTP id x9mr22733328qaj.63.1409951715232; Fri, 05 Sep 2014 14:15:15 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Fri, 5 Sep 2014 14:15:15 -0700 (PDT) In-Reply-To: References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> Date: Fri, 5 Sep 2014 14:15:15 -0700 X-Google-Sender-Auth: 5toLIEhSFI0HSzA5Rf4ui1Sm93s Message-ID: Subject: Re: svn commit: r271182 - head/sys/kern From: Adrian Chadd To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Mateusz Guzik , "src-committers@freebsd.org" , Gleb Smirnoff X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 21:15:17 -0000 I'm building a vimage kernel now to at least compile test a fix. Thanks, -a On 5 September 2014 12:59, Garrett Cooper wrote: > >> On Sep 5, 2014, at 12:54, Mateusz Guzik 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)" >>> >>> 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 >> >