I think I understood what is going on here.
In your last patch Brad you are overwriting the "dentry" variable in
the "kernfs_iop_mkdir()" function scope with the "dentry" variable
in the "if(!ret){}" block scope and passing it to the "kernfs_iop_lookup()"
static function, essentially passing a not initialized variabled to the
function. Of course, garbage in, panic out
I tested this small modification of your patch
- Code: Select all
kernfs_put_active(parent);
if (!ret) {
struct dentry *dentry_ret = kernfs_iop_lookup(dir, dentry, 0);
ret = PTR_ERR_OR_ZERO(dentry_ret);
}
return ret;
where I changed the block variable "dentry" into "dentry_ret"
and the kernel boot, and work, correctly, as to be expected from
the previous tests.
Let me know if it looks correct to your eyes Brad.
Orfheo.