From: <gregkh@linuxfoundation.org>
To: k.kozlowski@samsung.com, gregkh@linuxfoundation.org,
sboyd@codeaurora.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference" has been added to the 4.1-stable tree
Date: Fri, 31 Jul 2015 10:48:14 -0700 [thread overview]
Message-ID: <1438364894109245@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
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-ti-dra7-atl-clock-fix-possible-err_ptr-dereference.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 <stable@vger.kernel.org> know about it.
>From e0cdcda508f110b7ec190dc7c5eb2869ba73a535 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date: Wed, 13 May 2015 15:54:40 +0900
Subject: clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
commit e0cdcda508f110b7ec190dc7c5eb2869ba73a535 upstream.
of_clk_get_from_provider() returns ERR_PTR on failure. The
dra7-atl-clock driver was not checking its return value and
immediately used it in __clk_get_hw(). __clk_get_hw()
dereferences supplied clock, if it is not NULL, so in that case
it would dereference an ERR_PTR.
Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/ti/clk-dra7-atl.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/clk/ti/clk-dra7-atl.c
+++ b/drivers/clk/ti/clk-dra7-atl.c
@@ -252,6 +252,11 @@ static int of_dra7_atl_clk_probe(struct
}
clk = of_clk_get_from_provider(&clkspec);
+ if (IS_ERR(clk)) {
+ pr_err("%s: failed to get atl clock %d from provider\n",
+ __func__, i);
+ return PTR_ERR(clk);
+ }
cdesc = to_atl_desc(__clk_get_hw(clk));
cdesc->cinfo = cinfo;
Patches currently in stable-queue which might be from k.kozlowski@samsung.com are
queue-4.1/clk-ti-dra7-atl-clock-fix-possible-err_ptr-dereference.patch
queue-4.1/clocksource-exynos_mct-avoid-blocking-calls-in-the-cpu-hotplug-notifier.patch
reply other threads:[~2015-07-31 17:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438364894109245@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=k.kozlowski@samsung.com \
--cc=sboyd@codeaurora.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.