[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160308221320.GI8418@lukather>
Date: Tue, 8 Mar 2016 23:13:20 +0100
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Stephen Boyd <sboyd@...eaurora.org>
Cc: Chen-Yu Tsai <wens@...e.org>,
Michael Turquette <mturquette@...libre.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-clk <linux-clk@...r.kernel.org>
Subject: Re: [PATCH] clk: sunxi: Remove use of VLAIS
On Fri, Mar 04, 2016 at 09:18:41AM -0800, Stephen Boyd wrote:
> On 03/04, Maxime Ripard wrote:
> > On Thu, Mar 03, 2016 at 11:16:04AM -0800, Stephen Boyd wrote:
> > > From: Stephen Boyd <sboyd@...eaurora.org>
> > > Subject: [PATCH] clk: sunxi: Remove use of VLAIS
> >
> > VLAIS?
>
> Hmm I guess it's just VLA, so llvm won't break. I'll reword
> commit text.
>
> >
> > > @@ -107,6 +112,8 @@ err_free_div:
> > > kfree(div);
> > > err_unmap:
> > > iounmap(reg);
> > > +err_free_parents:
> > > + kfree(parents);
> > > of_address_to_resource(node, 0, &res);
> > > release_mem_region(res.start, resource_size(&res));
> >
> > The error path is wrong here, if you jump here from a failing call to
> > of_io_request_and_map, you'll end up releasing a memory region which
> > is not requested.
> >
>
> Oh right. Let's hope third time is the last.
>
> ---8<---
> From: Stephen Boyd <sboyd@...eaurora.org>
> Subject: [PATCH] clk: sunxi: Remove use of variable length array
>
> Using an array allocated on the stack may lead to stack overflows
> and other problems so let's move the allocation to the heap
> instead. This silences the following checker warning as well.
>
> drivers/clk/sunxi/clk-sun8i-mbus.c:36:29: warning: Variable length array is used.
>
> Cc: Chen-Yu Tsai <wens@...e.org>
> Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
> Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
Acked-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists