* [PATCH] ARM: amba: Fix leak of driver_override attribute value @ 2018-09-19 23:47 Trent Piepho 2018-09-20 6:48 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Trent Piepho @ 2018-09-19 23:47 UTC (permalink / raw) To: linux-kernel@vger.kernel.org Cc: Trent Piepho, Russell King, Todd Kjos, Geert Uytterhoeven, Greg Kroah-Hartman If driver_override was set when a device was released the string would not be kfree'ed in amba_device_release and thus leaked when the amba device was freed. Cc: Russell King <linux@armlinux.org.uk> Cc: Todd Kjos <tkjos@google.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Trent Piepho <tpiepho@impinj.com> --- drivers/amba/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 41b706403ef7..ff3cb96526bc 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -347,6 +347,7 @@ static void amba_device_release(struct device *dev) if (d->res.parent) release_resource(&d->res); + kfree(d->driver_override); kfree(d); } -- 2.14.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: amba: Fix leak of driver_override attribute value 2018-09-19 23:47 [PATCH] ARM: amba: Fix leak of driver_override attribute value Trent Piepho @ 2018-09-20 6:48 ` Geert Uytterhoeven 2018-09-20 7:09 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2018-09-20 6:48 UTC (permalink / raw) To: Trent Piepho Cc: Linux Kernel Mailing List, Russell King, Todd Kjos, Geert Uytterhoeven, Greg KH On Thu, Sep 20, 2018 at 1:48 AM Trent Piepho <tpiepho@impinj.com> wrote: > If driver_override was set when a device was released the string would > not be kfree'ed in amba_device_release and thus leaked when the amba > device was freed. > > Cc: Russell King <linux@armlinux.org.uk> > Cc: Todd Kjos <tkjos@google.com> > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Trent Piepho <tpiepho@impinj.com> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: amba: Fix leak of driver_override attribute value 2018-09-20 6:48 ` Geert Uytterhoeven @ 2018-09-20 7:09 ` Greg KH 2018-09-20 7:16 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2018-09-20 7:09 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Trent Piepho, Linux Kernel Mailing List, Russell King, Todd Kjos, Geert Uytterhoeven On Thu, Sep 20, 2018 at 08:48:36AM +0200, Geert Uytterhoeven wrote: > On Thu, Sep 20, 2018 at 1:48 AM Trent Piepho <tpiepho@impinj.com> wrote: > > If driver_override was set when a device was released the string would > > not be kfree'ed in amba_device_release and thus leaked when the amba > > device was freed. > > > > Cc: Russell King <linux@armlinux.org.uk> > > Cc: Todd Kjos <tkjos@google.com> > > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Signed-off-by: Trent Piepho <tpiepho@impinj.com> > > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> > Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device > binding path 'driver_override'") Then it should also have a cc: stable, right? thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: amba: Fix leak of driver_override attribute value 2018-09-20 7:09 ` Greg KH @ 2018-09-20 7:16 ` Geert Uytterhoeven 2018-09-20 7:24 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2018-09-20 7:16 UTC (permalink / raw) To: Greg KH Cc: Trent Piepho, Linux Kernel Mailing List, Russell King, Todd Kjos, Geert Uytterhoeven Hi Greg, On Thu, Sep 20, 2018 at 9:09 AM Greg KH <gregkh@linuxfoundation.org> wrote: > On Thu, Sep 20, 2018 at 08:48:36AM +0200, Geert Uytterhoeven wrote: > > On Thu, Sep 20, 2018 at 1:48 AM Trent Piepho <tpiepho@impinj.com> wrote: > > > If driver_override was set when a device was released the string would > > > not be kfree'ed in amba_device_release and thus leaked when the amba > > > device was freed. > > > > > > Cc: Russell King <linux@armlinux.org.uk> > > > Cc: Todd Kjos <tkjos@google.com> > > > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > Signed-off-by: Trent Piepho <tpiepho@impinj.com> > > > > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> > > Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device > > binding path 'driver_override'") > > Then it should also have a cc: stable, right? Perhaps. I usually leave that up to the maintainer, else git send-email sends it to stable immediately. The modern backporting AI will consider it anyway, due to the subject, and the Fixes tag, right? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: amba: Fix leak of driver_override attribute value 2018-09-20 7:16 ` Geert Uytterhoeven @ 2018-09-20 7:24 ` Greg KH 0 siblings, 0 replies; 5+ messages in thread From: Greg KH @ 2018-09-20 7:24 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Trent Piepho, Linux Kernel Mailing List, Russell King, Todd Kjos, Geert Uytterhoeven On Thu, Sep 20, 2018 at 09:16:36AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Thu, Sep 20, 2018 at 9:09 AM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Thu, Sep 20, 2018 at 08:48:36AM +0200, Geert Uytterhoeven wrote: > > > On Thu, Sep 20, 2018 at 1:48 AM Trent Piepho <tpiepho@impinj.com> wrote: > > > > If driver_override was set when a device was released the string would > > > > not be kfree'ed in amba_device_release and thus leaked when the amba > > > > device was freed. > > > > > > > > Cc: Russell King <linux@armlinux.org.uk> > > > > Cc: Todd Kjos <tkjos@google.com> > > > > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > Signed-off-by: Trent Piepho <tpiepho@impinj.com> > > > > > > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device > > > binding path 'driver_override'") > > > > Then it should also have a cc: stable, right? > > Perhaps. I usually leave that up to the maintainer, else git send-email sends > it to stable immediately. That's fine, no one ever complains about that. In fact it is _good_ to have that happen, as it gives us stable people a "heads up" that something is coming to resolve a reported problems. > The modern backporting AI will consider it anyway, due to the subject, and > the Fixes tag, right? Don't count on the "AI" to pick things up if you _know_ it resolves a problem, like you have said here. So please, just add it when you know it needs to be backported, otherwise it might never get backported. thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-20 7:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-09-19 23:47 [PATCH] ARM: amba: Fix leak of driver_override attribute value Trent Piepho 2018-09-20 6:48 ` Geert Uytterhoeven 2018-09-20 7:09 ` Greg KH 2018-09-20 7:16 ` Geert Uytterhoeven 2018-09-20 7:24 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox