[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <159546879710.3847286.14955586064206205548@swboyd.mtv.corp.google.com>
Date: Wed, 22 Jul 2020 18:46:37 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Adam Ford <aford173@...il.com>,
Colin King <colin.king@...onical.com>,
Marek Vasut <marek.vasut@...il.com>,
Michael Turquette <mturquette@...libre.com>,
linux-clk@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] clk: vc5: fix use of memory after it has been kfree'd
Quoting Colin King (2020-06-25 06:27:36)
> From: Colin Ian King <colin.king@...onical.com>
>
> There are a several places where printing an error message of
> init.name occurs after init.name has been kfree'd. Also the failure
> message is duplicated each time in the code. Fix this by adding
> a registration error failure path for these cases, moving the
> duplicated error messages to one common point and kfree'ing init.name
> only after it has been used.
>
> Changes also shrink the object code size by 171 bytes (x86-64, gcc 9.3):
>
> Before:
> text data bss dec hex filename
> 21057 3960 64 25081 61f9 drivers/clk/clk-versaclock5.o
>
> After:
> text data bss dec hex filename
> 20886 3960 64 24910 614e drivers/clk/clk-versaclock5.o
>
> Addresses-Coverity: ("Use after free")
> Fixes: f491276a5168 ("clk: vc5: Allow Versaclock driver to support multiple instances")
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
Applied to clk-next
Powered by blists - more mailing lists