aboutsummaryrefslogtreecommitdiff
path: root/CREDITS
diff options
context:
space:
mode:
authorAlessandro Carminati2023-09-21 07:32:17 +0000
committerGreg Kroah-Hartman2023-11-02 09:35:32 +0100
commit48ebeab0eda10280264c3001a45ec76642952617 (patch)
treeaf9c5257523897c7af855035aa5932ae1f621b02 /CREDITS
parent65e5a9890e03cfe9379275d1aa561643cbd62629 (diff)
clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name
commit ceb87a361d0b079ecbc7d2831618c19087f304a9 upstream. In the possible_parent_show function, ensure proper handling of the return value from of_clk_get_parent_name to prevent potential issues arising from a NULL return. The current implementation invokes seq_puts directly on the result of of_clk_get_parent_name without verifying the return value, which can lead to kernel panic if the function returns NULL. This patch addresses the concern by introducing a check on the return value of of_clk_get_parent_name. If the return value is not NULL, the function proceeds to call seq_puts, providing the returned value as argument. However, if of_clk_get_parent_name returns NULL, the function provides a static string as argument, avoiding the panic. Fixes: 1ccc0ddf046a ("clk: Use seq_puts() in possible_parent_show()") Reported-by: Philip Daly <pdaly@redhat.com> Signed-off-by: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com> Link: https://lore.kernel.org/r/20230921073217.572151-1-alessandro.carminati@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions