From owner-svn-src-all@FreeBSD.ORG Mon Nov 22 19:21:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABDDB10657A8; Mon, 22 Nov 2010 19:21:14 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id 51CB28FC13; Mon, 22 Nov 2010 19:21:14 +0000 (UTC) Received: from macfeast.lan (0x573b9942.cpe.ge-1-2-0-1101.ronqu1.customer.tele.dk [87.59.153.66]) by csmtp2.one.com (Postfix) with ESMTPA id 365AED58F5912; Mon, 22 Nov 2010 19:02:07 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/signed; boundary=Apple-Mail-1-760198070; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <201011221242.oAMCgW9O092144@svn.freebsd.org> Date: Mon, 22 Nov 2010 20:02:06 +0100 Message-Id: <32292B2D-6D71-4AA5-A0AE-41E2D713293A@cederstrand.dk> References: <201011221242.oAMCgW9O092144@svn.freebsd.org> To: Alexander Leidinger X-Mailer: Apple Mail (2.1082) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215675 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 19:21:14 -0000 --Apple-Mail-1-760198070 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Den 22/11/2010 kl. 13.42 skrev Alexander Leidinger: > Author: netchild > Date: Mon Nov 22 12:42:32 2010 > New Revision: 215675 > URL: http://svn.freebsd.org/changeset/base/215675 >=20 > Log: > Do not take the process lock. The assignment to u_short inside the > properly aligned structure is atomic on all supported architectures, = and > the thread that should see side-effect of assignment is the same = thread > that does assignment. >=20 > Use a more appropriate conditional to detect the linux ABI. >=20 > Suggested by: kib > X-MFC: together with r215664 >=20 > Modified: > head/sys/compat/linux/linux_emul.c >=20 > Modified: head/sys/compat/linux/linux_emul.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/compat/linux/linux_emul.c Mon Nov 22 12:33:48 2010 = (r215674) > +++ head/sys/compat/linux/linux_emul.c Mon Nov 22 12:42:32 2010 = (r215675) > @@ -198,11 +198,8 @@ linux_proc_exit(void *arg __unused, stru > } else=09 > EMUL_SHARED_WUNLOCK(&emul_shared_lock); >=20 > - if ((shared_flags & EMUL_SHARED_HASXSTAT) !=3D 0) { > - PROC_LOCK(p); > + if ((shared_flags & EMUL_SHARED_HASXSTAT) !=3D 0) > p->p_xstat =3D shared_xstat; > - PROC_UNLOCK(p); > - } >=20 > if (child_clear_tid !=3D NULL) { > struct linux_sys_futex_args cup; > @@ -265,7 +262,8 @@ linux_proc_exec(void *arg __unused, stru > if (__predict_false(imgp->sysent =3D=3D &elf_linux_sysvec > && p->p_sysent !=3D &elf_linux_sysvec)) > linux_proc_init(FIRST_THREAD_IN_PROC(p), p->p_pid, 0); > - if (__predict_false(p->p_sysent =3D=3D &elf_linux_sysvec)) > + if (__predict_false((p->p_sysent->sv_flags & SV_ABI_MASK) =3D=3D > + SV_ABI_LINUX)) > /* Kill threads regardless of imgp->sysent value */ > linux_kill_threads(FIRST_THREAD_IN_PROC(p), SIGKILL); > if (__predict_false(imgp->sysent !=3D &elf_linux_sysvec This breaks make buildkernel for me (8.1 RELEASE host): = /usr/home/erik/freebsd/head/src/sys/modules/linux/../../compat/linux/linux= _emul.c: In function 'linux_proc_exec': = /usr/home/erik/freebsd/head/src/sys/modules/linux/../../compat/linux/linux= _emul.c:265: error: dereferencing pointer to incomplete type = /usr/home/erik/freebsd/head/src/sys/modules/linux/../../compat/linux/linux= _emul.c:265: error: 'SV_ABI_MASK' undeclared (first use in this = function) Erik= --Apple-Mail-1-760198070--