From owner-freebsd-current@FreeBSD.ORG Tue May 1 10:25:23 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 307F716A400 for ; Tue, 1 May 2007 10:25:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 614A213C44C for ; Tue, 1 May 2007 10:25:22 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 930FC2083; Tue, 1 May 2007 12:25:16 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 13A30207E; Tue, 1 May 2007 12:25:16 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id EB76B5699; Tue, 1 May 2007 12:25:15 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Kostik Belousov References: <200704281128.44077.shoesoft@gmx.net> <20070428115503.GM2441@deviant.kiev.zoral.com.ua> Date: Tue, 01 May 2007 12:25:15 +0200 In-Reply-To: <20070428115503.GM2441@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sat, 28 Apr 2007 14:55:03 +0300") Message-ID: <86y7k8rgc4.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Stefan Ehmann Subject: Re: strace causes panic: sleeping thread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 10:25:23 -0000 Kostik Belousov writes: > This is changed by rev. 1.62 of the fs/pseudofs/pseudofs_vnops.c, before = it > process was held during pn_ioctl() call instead of being locked. Also, th= is > change seems to also take place for getextattr(). Yes. These changes were intentional. > With the following patch, I was able to successfully strace ls. The patch is incorrect. It circumvents the pn_ioctl() wrapper, which documents and enforces certain locking assumptions. procfs_ioctl() needs the process to be locked; pn_ioctl() verifies that this is the case before calling it. The correct fix is not to unlock the process before calling procfs_ioctl(), but to remove the latter's redundant PROC_LOCK() / PROC_UNLOCK() calls. As for pfs_getextattr(), there is no reason to modify it unless you can demonstrate (and I can guarantee that you can't) that an existing pseudofs consumer has a getextattr() callback which expects the process to be held but not locked. > As a side note, it seems that procfs ABI changed, strace built on > RELENG_6 cannot run on CURRENT. I am not aware of any ABI change. Please provide more details. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no