Patch "clk: versatile: off by one in clk_sp810_timerclken_of_get()" has been added to the 4.1-stable tree
This is a note to let you know that I've just added the patch titled
clk: versatile: off by one in clk_sp810_timerclken_of_get()
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
3294bee87091be5f179474f6c39d1d87769635e2Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Wed, 29 Jul 2015 13:17:06 +0300
Subject: clk: versatile: off by one in clk_sp810_timerclken_of_get()
From: Dan Carpenter <[email protected]>
commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.
The ">" should be ">=" or we end up reading beyond the end of the array.
--- drivers/clk/versatile/clk-sp810.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/versatile/clk-sp810.c +2 -2
@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_ {struct clk_sp810 *sp810 = data; -if (WARN_ON (clkspec->args_count !=1 || clkspec->args[0 ] > -ARRAY_SIZE (sp810->timerclken))) +if (WARN_ON (clkspec->args_count !=1 || + clkspec->args[0 ] >=ARRAY_SIZE (sp810->timerclken)))return NULL ;return sp810->timerclken[clkspec->args[0 ]].clk;
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch