Bug 23191

Summary: [PATCH] Fix for panics in lookup() after forced unmount
Product: Base System Reporter: tmoestl <tmoestl>
Component: kernAssignee: Alfred Perlstein <alfred>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description tmoestl 2000-11-30 13:40:00 UTC
This is a fix for a problem described in PR kern/19572. It was
recently discussed at -hackers. The problem is a null-pointer 
dereference that happens in kern/vfs_lookup.c when accessing ".." 
with a v_mount entry for the current directory vnode of NULL. This 
happens when a volume is forcibly unmounted, and the vnode for a 
working directory in the mounted volume is cleared.

Fix: The following patch should fix the problem, as discussed on -hackers.
It is against 4.2-STABLE, but it applies (with minor offsets) to -CURRENT,
and there seems to not have changed anything that could make the patch
break. If this gets mangled, the patch is also at
http://home.t-online.de/home/Moestl/lookup-dotdot.diff
How-To-Repeat: cd into a mountpoint, forcibly unmount the volume, and try to access "..":

mount /cdrom
cd /cdrom
umount -f /cdrom
ls ..
Comment 1 Alfred Perlstein freebsd_committer freebsd_triage 2000-11-30 20:06:09 UTC
Responsible Changed
From-To: freebsd-bugs->alfred

I need to be reminded to MFC this when it's proven in -current.
Comment 2 iedowse freebsd_committer freebsd_triage 2001-05-20 13:16:18 UTC
State Changed
From-To: open->closed


Now MFC'd to RELENG_4 in revision 1.38.2.2 of vfs_lookup.c, so this 
can be closed.