From owner-svn-src-stable@freebsd.org Fri May 19 23:01:57 2017 Return-Path: Delivered-To: svn-src-stable@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 4842FD7493A; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1823A13F0; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JN1uxI073668; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JN1udK073667; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705192301.v4JN1udK073667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 19 May 2017 23:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318563 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 23:01:57 -0000 Author: jhb Date: Fri May 19 23:01:55 2017 New Revision: 318563 URL: https://svnweb.freebsd.org/changeset/base/318563 Log: MFC 318360: Fix p_endcopy. For p_endcopy to work correctly, it must be the name of the next element in struct proc after the end of the copy region, not the name of the last element in the copy region. Currently, the last element (p_elf_flags) is not being copied. In addition, the p_xexit and p_xsig fields should not be copied on fork, so move them out of the copy region. Note that for stable/11 the fix is a bit simpler than in HEAD as it merely consists of formally moving p_xexit and p_xsig out of the copy region by shrinking the end of the copy region. Modified: stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Fri May 19 22:54:45 2017 (r318562) +++ stable/11/sys/sys/proc.h Fri May 19 23:01:55 2017 (r318563) @@ -624,12 +624,11 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - u_int p_xexit; /* (c) Exit code. */ - u_int p_xsig; /* (c) Stop/kill sig. */ - /* End area that is copied on creation. */ -#define p_endcopy p_pgrp +#define p_endcopy p_xexit + u_int p_xexit; /* (c) Exit code. */ + u_int p_xsig; /* (c) Stop/kill sig. */ struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */