int d_validate(struct dentry * dentry, struct dentry * dparent, unsigned int hash, unsigned int len);
The dentry alleged to be valid
The parent dentry
Hash of the dentry
Length of the name
An insecure source has sent us a dentry, here we verify it. This is used by ncpfs in its readdir implementation. Zero is returned in the dentry is invalid.
This function does _not_ dereference the pointers before we have validated them. We can test the pointer values, but we must not actually use them until we have found a valid copy of the pointer in kernel space..