From owner-svn-src-head@FreeBSD.ORG Fri Sep 5 19:59:23 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 47012A04; Fri, 5 Sep 2014 19:59:23 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (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 0AAEC15B5; Fri, 5 Sep 2014 19:59:23 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id fa1so22922033pad.40 for ; Fri, 05 Sep 2014 12:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=GwxKzu39H+dFh4lPSee3iQMh5EuCjF4Gr+UzHxgtVLI=; b=rgLx/mlQann8E1jKUppt8HeMjN7Xj1qUT829PC/X84DK7+VlJ21Vf3/mqf5i+TsTsB yImOQxbq/S6meNREdpX/w5dREPyw+0uLQ7KEyWihFDT7bX5zI7tbI4LFMeP4TmiESOZO ul6aRYN77W/Twpk0KfdrOOsGsrdNTTKMnLy31T4I4ODg0MJbyBSFnIflenH28lERBo/1 obx9wAc2mG+RSD2noMYhdMrxFIofo7SCDJrGoJfo6oSmQH017D2EZhZto1R8GNhFSAKJ AmHySmRS8poInNgGkQ2Wb34B/b+td+E00uwSK0l/0uICxXCD8eFXk5WuUVEh6+epYk81 foLg== X-Received: by 10.67.23.136 with SMTP id ia8mr1205597pad.125.1409947162569; Fri, 05 Sep 2014 12:59:22 -0700 (PDT) Received: from [10.88.239.179] (mobile-166-137-215-074.mycingular.net. [166.137.215.74]) by mx.google.com with ESMTPSA id nj7sm2487319pdb.10.2014.09.05.12.59.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 12:59:21 -0700 (PDT) References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> Mime-Version: 1.0 (1.0) In-Reply-To: <20140905195410.GA722@dft-labs.eu> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r271182 - head/sys/kern Date: Fri, 5 Sep 2014 12:59:12 -0700 To: Mateusz Guzik Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" 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 19:59:23 -0000 > On Sep 5, 2014, at 12:54, Mateusz Guzik wrote: >=20 >> 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 >>=20 >> Log: >> Set vnet context before accessing V_socket_hhh[]. >>=20 >> Submitted by: "Hiroo Ono (=1B$B>.Ln42@8=1B(B)" >>=20 >> Modified: >> head/sys/kern/uipc_socket.c >>=20 >> 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; >> } >>=20 >> + 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(); >=20 > 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); >>=20 >> + 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(); >>=20 >> if (so->so_snd.sb_state & SBS_CANTSENDMORE) { >> kn->kn_flags |=3D EV_EOF; >=20 > --=20 > Mateusz Guzik >=20