[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVep4Hib0iBabGdFfbCxdftWcJ8wfySGLB8GbmbSmBNhg@mail.gmail.com>
Date: Fri, 8 Sep 2023 17:34:53 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Rob Herring <robh@...nel.org>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
kbuild test robot <lkp@...el.com>,
Frank Rowand <frowand.list@...il.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] of: dynamic: Fix potential memory leak in of_changeset_action()
Hi Rob,
On Fri, Sep 8, 2023 at 5:18 PM Rob Herring <robh@...nel.org> wrote:
> On Fri, Sep 8, 2023 at 2:03 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> > Smatch complains that the error path where "action" is invalid leaks
> > the "ce" allocation:
> > drivers/of/dynamic.c:935 of_changeset_action()
> > warn: possible memory leak of 'ce'
> >
> > Fix this by doing the validation before the allocation.
>
> I'm going to add a note when applying that "action" can't ever
> actually be invalid because all the callers are static inlines with
> hardcoded action values. I suppose there could be an out of tree
> module calling of_changeset_action() directly, but that's wrong given
> the wrappers.
FTR, the out-of-tree overlay configfs patches do not call
of_changeset_action() (or any of the wrappers).
> > Fixes: 914d9d831e61 ("of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock")
> > Reported-by: kernel test robot <lkp@...el.com>
> > Closes: https://lore.kernel.org/r/202309011059.EOdr4im9-lkp@intel.com/
>
> Despite what that says, it was never reported to me. IOW, the added TO
> and CC lines don't seem to have any effect.
The copy I received did list you in the "To"-header, though.
Fall-out of the issues seen with Gmail lately?
I do miss lots of email, too :-(
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists