Subject: Re: [PATCH v2 18/50] convert pstore

From: Kees Cook <[email-masked]>
Date: Mon, 3 Nov 2025 17:43:44 -0800

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 <[email-masked]>

Thanks for the refactoring!

Reviewed-by: Kees Cook <[email-masked]>

-- 
Kees Cook