From owner-svn-src-head@FreeBSD.ORG Fri Sep 24 10:17:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB7A8106566C; Fri, 24 Sep 2010 10:17:30 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3351B8FC0A; Fri, 24 Sep 2010 10:17:29 +0000 (UTC) Received: by qyk7 with SMTP id 7so746322qyk.13 for ; Fri, 24 Sep 2010 03:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wx2spGVd12hVMDcnzFzPv9pyCdCZ+Xzhm6BHgH/kLok=; b=CtQHp9Qutc5wXlQM14Q+N0bjWo7Z+Ur0J5jkJZFjqYTW7rl6fp0FaGCgFYlaJs0WS6 WiTNQxxueVdBXhdNyE1vqbwXHVysqvvfIMHgZI/y3BOWjQ6PuMZG8Bt/gZpxD8cA6ctg XGl0+Qs93NnP+ATrr3FrYQSNY4q1lCPjGrsHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=X5wyJpULYAOqsPZcPj7dFeOOjTxfo0+TsFPcMf/s5FVnf/K/TX2OJlBKoFkrG0v5+D v7h73J7pZJcvri6f590gUmc2RyO3f1uNtXupOZ11+Soaa1Ou5sEP8V3YHZr0Mbd830s8 KLGhH5at7b/dev9/U9V4gxmUrYzWv7pC+3zLs= MIME-Version: 1.0 Received: by 10.229.215.76 with SMTP id hd12mr2378143qcb.44.1285323449379; Fri, 24 Sep 2010 03:17:29 -0700 (PDT) Received: by 10.229.50.8 with HTTP; Fri, 24 Sep 2010 03:17:29 -0700 (PDT) In-Reply-To: <201009160756.o8G7uZrg065332@svn.freebsd.org> References: <201009160756.o8G7uZrg065332@svn.freebsd.org> Date: Fri, 24 Sep 2010 14:17:29 +0400 Message-ID: From: pluknet To: Dag-Erling Smorgrav Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212723 - head/sys/compat/linprocfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 24 Sep 2010 10:17:30 -0000 On 16 September 2010 11:56, Dag-Erling Smorgrav wrote: > Author: des > Date: Thu Sep 16 07:56:34 2010 > New Revision: 212723 > URL: http://svn.freebsd.org/changeset/base/212723 > > Log: > =A0Implement proc/$$/environment. > [...] > =A0/* > =A0* Filler function for proc/pid/environ > =A0*/ > =A0static int > =A0linprocfs_doprocenviron(PFS_FILL_ARGS) > =A0{ > + =A0 =A0 =A0 int ret; > > - =A0 =A0 =A0 sbuf_printf(sb, "doprocenviron\n%c", '\0'); > - =A0 =A0 =A0 return (0); > + =A0 =A0 =A0 PROC_LOCK(p); With this change I observe the following sleepable after non-sleepable: 1st 0xffffff000290b558 process lock (process lock) @ /usr/src/sys/modules/linprocfs/../../compat/linprocfs/linprocfs.c:1049 2nd 0xffffff00028f8848 user map (user map) @ /usr/src/sys/vm/vm_map.c:3525 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a _witness_debugger() at _witness_debugger+0x2e witness_checkorder() at witness_checkorder+0x807 _sx_slock() at _sx_slock+0x55 vm_map_lookup() at vm_map_lookup+0x55 vm_fault() at vm_fault+0x113 proc_rwmem() at proc_rwmem+0x7a linprocfs_doprocenviron() at linprocfs_doprocenviron+0x122 pfs_read() at pfs_read+0x45b vn_read() at vn_read+0x256 dofileread() at dofileread+0xa1 kern_readv() at kern_readv+0x60 read() at read+0x55 syscallenter() at syscallenter+0x1aa syscall() at syscall+0x4c Xfast_syscall() at Xfast_syscall+0xe2 --- syscall (3, FreeBSD ELF64, read), rip =3D 0x80074134c, rsp =3D 0x7fffffffe9c8, rbp =3D 0 --- > + > + =A0 =A0 =A0 if ((ret =3D p_cansee(td, p)) !=3D 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 PROC_UNLOCK(p); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return ret; > + =A0 =A0 =A0 } > + > + =A0 =A0 =A0 ret =3D linprocfs_doargv(td, p, sb, ps_string_env); > + =A0 =A0 =A0 PROC_UNLOCK(p); > + =A0 =A0 =A0 return (ret); > =A0}