From owner-cvs-src-old@FreeBSD.ORG Mon Apr 20 14:36:21 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A0191065703 for ; Mon, 20 Apr 2009 14:36:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 879488FC0A for ; Mon, 20 Apr 2009 14:36:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n3KEaLrn056694 for ; Mon, 20 Apr 2009 14:36:21 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n3KEaL95056693 for cvs-src-old@freebsd.org; Mon, 20 Apr 2009 14:36:21 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200904201436.n3KEaL95056693@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Mon, 20 Apr 2009 14:36:01 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/ufs/ufs ufs_extern.h ufs_lookup.c ufs_vnops.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2009 14:36:21 -0000 kib 2009-04-20 14:36:01 UTC FreeBSD src repository Modified files: sys/ufs/ufs ufs_extern.h ufs_lookup.c ufs_vnops.c Log: SVN rev 191315 on 2009-04-20 14:36:01Z by kib In ufs_checkpath(), recheck that '..' still points to the inode with the same inode number after VFS_VGET() and relock of the vp. If '..' changed, redo the lookup. To reduce code duplication, move the code to read '..' dirent into the static helper function ufs_dir_dd_ino(). Supply the source inode number as an argument to ufs_checkpath() instead of the source inode itself. The inode is unlocked, thus it might be reclaimed, causing accesses to the freed memory. Use vn_vget_ino() to get the '..' vnode by its inode number, instead of directly code VFS_VGET() and relock, to properly busy the mount point while vp lock is dropped. Noted and reviewed by: tegge Tested by: pho MFC after: 1 month Revision Changes Path 1.56 +1 -1 src/sys/ufs/ufs/ufs_extern.h 1.98 +51 -39 src/sys/ufs/ufs/ufs_lookup.c 1.311 +3 -1 src/sys/ufs/ufs/ufs_vnops.c