From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:34:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF16BE3D; Wed, 10 Jun 2015 15:34:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD6D51804; Wed, 10 Jun 2015 15:34:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AFYhgv086468; Wed, 10 Jun 2015 15:34:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AFYhxX086467; Wed, 10 Jun 2015 15:34:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101534.t5AFYhxX086467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 15:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284226 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 10 Jun 2015 15:34:43 -0000 Author: mjg Date: Wed Jun 10 15:34:43 2015 New Revision: 284226 URL: https://svnweb.freebsd.org/changeset/base/284226 Log: linux: make sure to grab all cow structs when creating a thread This is a fixup for r284214. Reported and tested by: Ivan Klymenko Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Wed Jun 10 15:07:13 2015 (r284225) +++ head/sys/compat/linux/linux_fork.c Wed Jun 10 15:34:43 2015 (r284226) @@ -298,7 +298,7 @@ linux_clone_thread(struct thread *td, st __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = p; - newtd->td_ucred = crhold(td->td_ucred); + thread_cow_get(newtd, td); /* create the emuldata */ linux_proc_init(td, newtd, args->flags);