Guy Helmer wrote:
Does this make sense to anyone (it doesn't to me - procfs_doprofile
simply locks, calls vn_fullpath, and unlocks)? I was trying to track
down a hang by running a system under stress, and instead got this
panic as a result of a process running a perl script that looks
through /proc/; it occurred on a very busy system with lots of process
churn.
Does this change to src/sys/fs/procfs.c make sense? From my reading, it
is possible for vn_lock(9) to fail...
Index: procfs.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/procfs/procfs.c,v
retrieving revision 1.12.2.1
diff -u -r1.12.2.1 procfs.c
--- procfs.c 14 Jun 2006 21:20:39 -0000 1.12.2.1
+++ procfs.c 1 Feb 2007 15:19:30 -0000
@@ -69,8 +69,11 @@
{
char *fullpath = "unknown";
char *freepath = NULL;
+ int err;
- vn_lock(p->p_textvp, LK_EXCLUSIVE | LK_RETRY, td);
+ if ((err = vn_lock(p->p_textvp, LK_EXCLUSIVE | LK_RETRY, td)) != 0) {
+ return (err);
+ }
vn_fullpath(td, p->p_textvp, &fullpath, &freepath);
VOP_UNLOCK(p->p_textvp, 0, td);
sbuf_printf(sb, "%s", fullpath);
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"