From owner-svn-src-head@freebsd.org Mon Sep 25 20:59:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 938D2E241FF; Mon, 25 Sep 2017 20:59:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D53169466; Mon, 25 Sep 2017 20:59:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v8PKxTmo012674 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Sep 2017 13:59:30 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v8PKxTIo012673; Mon, 25 Sep 2017 13:59:29 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 25 Sep 2017 13:59:29 -0700 From: Gleb Smirnoff To: Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323873 - head/sys/netgraph Message-ID: <20170925205929.GW1055@FreeBSD.org> References: <201709212016.v8LKGBMi024412@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201709212016.v8LKGBMi024412@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 25 Sep 2017 20:59:31 -0000 On Thu, Sep 21, 2017 at 08:16:11PM +0000, Eugene Grosbein wrote: E> Author: eugen (ports committer) E> Date: Thu Sep 21 20:16:10 2017 E> New Revision: 323873 E> URL: https://svnweb.freebsd.org/changeset/base/323873 E> E> Log: E> Unprotected modification of ng_iface(4) private data leads to kernel panic. E> Fix a race with per-node read-mostly lock and refcounting for a hook. The patch is far from ideal. Netgraph already has internal locking, which guarantess write semantics for "disconnect" and "newhook" scenarios. As well as read semantics for "rcvdata". Since ng_iface is a gate node, that gates data between netgraph and the big network stack, it of course needs extra locking in the interface output method. But better piggyback on the netgraph locking, rather than add your own, IMHO. -- Gleb Smirnoff