# HG changeset patch # User batschul # Date 1249660715 21600 # Node ID 61e767547602ce70812b05e76c04752caf875685 # Parent 8c0d8d983f7dec11eb5d66b17bf191735dbf4183 6594239 Interrupting fssnap when it is being trussed will wedge the system diff -r 8c0d8d983f7d -r 61e767547602 usr/src/uts/common/fs/ufs/ufs_lockfs.c --- a/usr/src/uts/common/fs/ufs/ufs_lockfs.c Fri Aug 07 06:47:37 2009 -0600 +++ b/usr/src/uts/common/fs/ufs/ufs_lockfs.c Fri Aug 07 09:58:35 2009 -0600 @@ -239,11 +239,21 @@ int error = 0; ulockfs_info_t *head; ulockfs_info_t *info; + klwp_t *lwp = ttolwp(curthread); head = (ulockfs_info_t *)tsd_get(ufs_lockfs_key); SEARCH_ULOCKFSP(head, ulp, info); /* + * We have to keep /proc away from stopping us after we applied + * the softlock but before we got a chance to clear it again. + * prstop() may pagefault and become stuck on the softlock still + * pending. + */ + if (lwp != NULL) + lwp->lwp_nostop++; + + /* * Set a softlock to suspend future ufs_vnops so that * this lockfs request will not be starved */ @@ -279,6 +289,9 @@ */ ULOCKFS_CLR_SLOCK(ulp); + if (lwp != NULL) + lwp->lwp_nostop--; + return (error); }