[PATCH v2 18/50] convert pstore

Kees Cook kees at kernel.org
Tue Nov 4 12:43:44 AEDT 2025


On Tue, Oct 28, 2025 at 12:45:37AM +0000, Al Viro wrote:
> object creation by d_alloc_name()+d_add() in pstore_mkfile(), removal -
> via normal VFS codepaths (with ->unlink() using simple_unlink()) or
> in pstore_put_backend_records() via locked_recursive_removal()
> 
> Replace d_add() with d_make_persistent()+dput() - that's what really
> happens there.  The reference that goes into record->dentry is valid
> only until the unlink (and explicitly cleared by pstore_unlink()).
> 
> Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>

Thanks for the refactoring!

Reviewed-by: Kees Cook <kees at kernel.org>

-- 
Kees Cook


More information about the Linuxppc-dev mailing list