linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from clk_get_sys
@ 2015-05-13  6:54 Krzysztof Kozlowski
  2015-05-13  6:54 ` [RFT PATCH 1/8] clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference Krzysztof Kozlowski
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-05-13  6:54 UTC (permalink / raw)
  To: Tero Kristo, Mike Turquette, Stephen Boyd, linux-omap, linux-clk,
	linux-kernel
  Cc: Krzysztof Kozlowski

Hi,


clk_get_sys() may return ERR_PTR but the drivers immediately
dereferenced the return value. This could lead to oops.

I tried only to fix possible ERR_PTR dereference and to not change
the logic. This is why some of the patches look quite complex.
For example in clk-7xx driver proceeds to next clocks if first one fails.

WARNING:
The patchset was only compile tested (plus static checkers), as
I do not have the hardware. I am kindly asking for tests.


Best regards,
Krzysztof


Krzysztof Kozlowski (8):
  clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
  clk: ti: clk-2xxx: Prevent possible ERR_PTR dereference
  clk: ti: clk-3xxx: Prevent possible ERR_PTR dereference
  clk: ti: clk-33xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-54xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-7xx: Prevent possible ERR_PTR dereference

 drivers/clk/ti/clk-2xxx.c     | 18 ++++++++++++----
 drivers/clk/ti/clk-33xx.c     |  9 +++++---
 drivers/clk/ti/clk-3xxx.c     | 18 ++++++++++++----
 drivers/clk/ti/clk-43xx.c     |  3 ++-
 drivers/clk/ti/clk-44xx.c     | 16 ++++++++++----
 drivers/clk/ti/clk-54xx.c     | 47 +++++++++++++++++++++++++++-------------
 drivers/clk/ti/clk-7xx.c      | 50 +++++++++++++++++++++++++------------------
 drivers/clk/ti/clk-dra7-atl.c |  5 +++++
 8 files changed, 114 insertions(+), 52 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-14 22:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13  6:54 [RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from clk_get_sys Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 1/8] clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference Krzysztof Kozlowski
2015-05-14 22:31   ` Stephen Boyd
2015-05-13  6:54 ` [RFT PATCH 2/8] clk: ti: clk-2xxx: Prevent " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 3/8] clk: ti: clk-3xxx: " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 4/8] clk: ti: clk-33xx: " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 5/8] clk: ti: clk-43xx: " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 6/8] " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 7/8] clk: ti: clk-54xx: " Krzysztof Kozlowski
2015-05-13  6:54 ` [RFT PATCH 8/8] clk: ti: clk-7xx: " Krzysztof Kozlowski
2015-05-13  7:07 ` [RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from clk_get_sys Tero Kristo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).