Re: [PATCH] cachefiles: fix dentry leak in cachefiles_open_file()

From: David Howells
Date: Wed Aug 28 2024 - 12:15:07 EST


Baokun Li <libaokun@xxxxxxxxxxxxxxx> wrote:

> > You couldn't do that anyway, since kernel_file_open() steals the caller's ref
> > if successful.
> Ignoring kernel_file_open(), we now put a reference count of the dentry
> whether cachefiles_open_file() returns true or false.

Actually, I'm wrong kernel_file_open() doesn't steal a ref.

David