Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-06 Thread Kees Cook
On Wed, May 06, 2020 at 07:49:20PM +0100, Al Viro wrote: > On Wed, May 06, 2020 at 08:34:29AM -0700, Kees Cook wrote: > > > Just posted the whole series: > > https://lore.kernel.org/lkml/20200506152114.50375-1-keesc...@chromium.org/ > > > > But the specific question was driven by this patch: > >

Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-06 Thread Al Viro
On Wed, May 06, 2020 at 08:34:29AM -0700, Kees Cook wrote: > Just posted the whole series: > https://lore.kernel.org/lkml/20200506152114.50375-1-keesc...@chromium.org/ > > But the specific question was driven by this patch: > https://lore.kernel.org/lkml/20200506152114.50375-11-keesc...@chromium.

Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-06 Thread Kees Cook
On Wed, May 06, 2020 at 05:02:52AM +0100, Al Viro wrote: > On Tue, May 05, 2020 at 08:28:33PM -0700, Kees Cook wrote: > > On Wed, May 06, 2020 at 02:14:31AM +0100, Al Viro wrote: > > > On Tue, May 05, 2020 at 04:40:35PM -0700, Kees Cook wrote: > > > > After using simple_unlink(), a call to d_delete

Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-05 Thread Al Viro
On Tue, May 05, 2020 at 08:28:33PM -0700, Kees Cook wrote: > On Wed, May 06, 2020 at 02:14:31AM +0100, Al Viro wrote: > > On Tue, May 05, 2020 at 04:40:35PM -0700, Kees Cook wrote: > > > After using simple_unlink(), a call to d_delete() is needed in addition > > > to dput(). > > > > > > Signed-off

Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-05 Thread Kees Cook
On Wed, May 06, 2020 at 02:14:31AM +0100, Al Viro wrote: > On Tue, May 05, 2020 at 04:40:35PM -0700, Kees Cook wrote: > > After using simple_unlink(), a call to d_delete() is needed in addition > > to dput(). > > > > Signed-off-by: Kees Cook > > --- > > Is this correct? I went looking around and

Re: [PATCH] securityfs: Add missing d_delete() call on removal

2020-05-05 Thread Al Viro
On Tue, May 05, 2020 at 04:40:35PM -0700, Kees Cook wrote: > After using simple_unlink(), a call to d_delete() is needed in addition > to dput(). > > Signed-off-by: Kees Cook > --- > Is this correct? I went looking around and there are a lot of variations > on the simple_unlink() pattern... > >

[PATCH] securityfs: Add missing d_delete() call on removal

2020-05-05 Thread Kees Cook
After using simple_unlink(), a call to d_delete() is needed in addition to dput(). Signed-off-by: Kees Cook --- Is this correct? I went looking around and there are a lot of variations on the simple_unlink() pattern... Many using explicit locking and combinations of d_drop(), __d_drop(), etc.