[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <pxsmb5nsar65occgepuoetame3ia6mudmw54cx7ah7bu57utkh@b6jeupqvprjz>
Date: Wed, 16 Jul 2025 07:30:19 -0700
From: Breno Leitao <leitao@...ian.org>
To: James Bottomley <James.Bottomley@...senpartnership.com>
Cc: Ard Biesheuvel <ardb@...nel.org>, Jeremy Kerr <jk@...abs.org>,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] efivarfs: Suppress false-positive kmemleak warning for
sfi
On Wed, Jul 16, 2025 at 09:26:03AM -0400, James Bottomley wrote:
> On Wed, 2025-07-16 at 06:16 -0700, Breno Leitao wrote:
> > diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
> > index c900d98bf4945..07a3b9293396b 100644
> > --- a/fs/efivarfs/super.c
> > +++ b/fs/efivarfs/super.c
> > @@ -390,10 +390,22 @@ static int efivarfs_reconfigure(struct
> > fs_context *fc)
> > return 0;
> > }
> >
> > +static void efivarfs_free(struct fs_context *fc)
> > +{
> > + struct efivarfs_fs_info *sfi;
> > +
> > + sfi = fc->s_fs_info;
> > + if (!sfi)
> > + return;
>
> Here, you'll excite the coccinelle checkers looking for if(x) free(x)
> because free() already also has a test for NULL.
Good point.
> Other than that elision, it looks fine to me.
Thanks. I will send a v2.
--breno
Powered by blists - more mailing lists