Re: [PATCH] ovl: pass an explicit reference of creators creds to callers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 14, 2024 at 11:12 AM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> On Thu, Nov 14, 2024 at 11:05:36AM +0100, Amir Goldstein wrote:
> > ovl_setup_cred_for_create() decrements one refcount of new creds and
> > ovl_revert_creds() in callers decrements the last refcount.
> >
> > In preparation to revert_creds_light() back to caller creds, pass an
> > explicit reference of the creators creds to the callers and drop the
> > refcount explicitly in the callers after ovl_revert_creds().
> >
> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > ---
> >
> > Miklos, Christian,
> >
> > I was chasing a suspect memleak in revert_creds_light() patches.
> > This fix is unrelated to memleak but I think it is needed for
> > correctness anyway.
> >
> > This applies in the middle of the series after adding the
> > ovl_revert_creds() helper.
>
> I'm going to try and reproduce the kmemleak with your ovl_creds branch
> as is and then retry with the series applied as is plus one small fix
> you correctly pointed out.

Don't bother. The fix that Vinicius sent me was correct.
I still want to use this patch, so would appreciate a review.

Thanks,
Amir.





[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux