From 6a4152243f1b6dba4ad0952116c83b6072b23a9c Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Thu, 16 Dec 1999 22:02:09 +0000 Subject: [PATCH] The function request_cleanup() had a tsleep() with PCATCH. It is quite dangerous, since the process may hold locks at the point, and if it is stopped in that tsleep the machine may hang. Because the sleep is so short, the PCATCH is not required here, so it has been removed. For the future, the FreeBSD team needs to decide whether it is still reasonable to stop a process in tsleep, as that may affect any other code that uses PCATCH while holding kernel locks. Submitted by: Dmitrij Tejblum Reviewed by: Kirk McKusick --- sys/contrib/softupdates/ffs_softdep.c | 2 +- sys/ufs/ffs/ffs_softdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/softupdates/ffs_softdep.c b/sys/contrib/softupdates/ffs_softdep.c index a0252d20889c..20cb2dce5be8 100644 --- a/sys/contrib/softupdates/ffs_softdep.c +++ b/sys/contrib/softupdates/ffs_softdep.c @@ -4252,7 +4252,7 @@ request_cleanup(resource, islocked) tickdelay > 2 ? tickdelay : 2); } FREE_LOCK_INTERLOCKED(&lk); - (void) tsleep((caddr_t)&proc_waiting, PPAUSE | PCATCH, "softupdate", 0); + (void) tsleep((caddr_t)&proc_waiting, PPAUSE, "softupdate", 0); ACQUIRE_LOCK_INTERLOCKED(&lk); if (proc_waiting) { untimeout(pause_timer, NULL, handle); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index a0252d20889c..20cb2dce5be8 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -4252,7 +4252,7 @@ request_cleanup(resource, islocked) tickdelay > 2 ? tickdelay : 2); } FREE_LOCK_INTERLOCKED(&lk); - (void) tsleep((caddr_t)&proc_waiting, PPAUSE | PCATCH, "softupdate", 0); + (void) tsleep((caddr_t)&proc_waiting, PPAUSE, "softupdate", 0); ACQUIRE_LOCK_INTERLOCKED(&lk); if (proc_waiting) { untimeout(pause_timer, NULL, handle);