Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 May 2007 12:25:15 +0200
From:      des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=)
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-current@freebsd.org, Stefan Ehmann <shoesoft@gmx.net>
Subject:   Re: strace causes panic: sleeping thread
Message-ID:  <86y7k8rgc4.fsf@dwp.des.no>
In-Reply-To: <20070428115503.GM2441@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sat, 28 Apr 2007 14:55:03 %2B0300")
References:  <200704281128.44077.shoesoft@gmx.net> <20070428115503.GM2441@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov <kostikbel@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y7k8rgc4.fsf>