From owner-freebsd-current Sat Oct 5 23:43:39 2002 Delivered-To: freebsd-current@freebsd.org Received: from green.bikeshed.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 61EED37B401 for ; Sat, 5 Oct 2002 23:43:38 -0700 (PDT) Received: from green.bikeshed.org (1a7p3fv2e6tm0d4v@green.bikeshed.org [10.0.0.1] (may be forged)) by green.bikeshed.org (8.12.6/8.12.6) with ESMTP id g9655fWe000623 for ; Sun, 6 Oct 2002 01:05:48 -0400 (EDT) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost) by green.bikeshed.org (8.12.6/8.12.6/Submit) with ESMTP id g95FkkX1008580 for ; Sat, 5 Oct 2002 11:46:46 -0400 (EDT) Message-Id: <200210051546.g95FkkX1008580@green.bikeshed.org> To: current@FreeBSD.org Subject: vnode locking screwed up in src/sys/ufs/ffs/ffs_snapshot.c:ffs_snapshot() From: Brian Fundakowski Feldman Date: Sat, 05 Oct 2002 11:46:45 -0400 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I got a crash today because "xvp" did not have an interlock when the call was made to vn_lock(LK_INTERLOCK): 407 if (snapdebug) 408 vprint("ffs_snapshot: busy vnode", xvp); 409 if (vn_lock(xvp, LK_EXCLUSIVE | LK_INTERLOCK, td) != 0) 410 goto loop; 411 xp = VTOI(xvp); 412 I don't in fact see any reason why "xvp" would have been locked already and that this could possibly be valid in the face of a mountpoint which had any vnodes at all open. This occurred on fscking my "/tmp" filesystem because of crashes (due to an SSE utilization bug in the kernel, it seems), which I'm sure was a filesystem in heavy use already. Does anyone have any insight on what the correct fix to this is? I don't have any idea exactly how to correct the locking in this function. Thanks for insight! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message