Messages in this thread | | | Date | Wed, 30 Jul 1997 11:02:47 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: 2.1.47 oops (crash) |
| |
On Wed, 30 Jul 1997, Bill Hawes wrote: > > Attached is a patch for fs/dcache.c that I think will guard against the > two oops reported recently. It appears that if a dentry with no parent > is unused but still hashed, calling shrink_dcache will free the dentry > and then try to free the parent. > > If dentries aren't supposed to get into this state, maybe we can search > for one too many hash insertions.
Dentries should always have a parent. Even when a dentry has to be forgotten, we forget it by removing it from the hash chains but _not_ removing the parent (so a parent can actually have multiple child dentries with the same name, but only one "active" dentry that you can reach through the hashes).
However, 2.1.47 does have a bug if you use autofs, in that the autofs dentry revalidation will be called without increasing the dentry count. So if you're revalidating a autofs dentry at the same time as the dcache is shrunk, the dentry will be pulled out from under you, with random results.
That's fixed in the current pre-patch-48 - but this is really only an issue if you use autofs. Do the people who have seen crashes use autofs? (autofs is very cool, and this wasn't really an autofs bug at all, but a VFS bug that just happened to trigger in autofs).
If autofs wasn't implicated, then we should indeed start looking for something where the hashes do not match the parents..
Linus
| |