[OpenAFS-devel] Linux 2.6.12 kernel BUG at fs/namei.c:1189

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Sun, 11 Dec 2005 12:23:48 -0500


In message <87fyoz38fv.fsf@windlord.stanford.edu>,Russ Allbery writes:
>This came up when I was cleaning tripwire reports.  The way we do tripwire
>is to have one AFS volume per machine that holds the machine configuration
>and the current tripwire database, all of which are mounted in a single
>replicated directory.  I had been running tripwire on different machines
...
>Whenever I found a system where the mount point didn't match the hostname,
>I'd switch to the read/write path and mv the mount point to the right
>name, then release the volume.  When I did that, I got this kernel BUG and

yeah, this is going to be a problem i think.  you have a single
volume/mountpoint which can be reach via two different paths:

	/afs/cellname/readwrite/a
	/afs/cellname/readonly/a

so which is a's parent?  readwrite or readonly?  with the current code,
the path you lookup first determines a's parent (with respect to linux's
dentry cache).  doing a revalidate before the rename might fix this but
i dont think so.  more likely, we need something that checks a dentry to
see if it matches what linux's idea of the parent is.  rename is passed
a parent that is not derived from the involved dentries.