alistair23-linux/drivers/clk
Sylwester Nawrocki 3a3d2b0551 clkdev: Fix race condition in clock lookup from device tree
There is currently a race condition in the device tree part of clk_get()
function, since the pointer returned from of_clk_get_by_name() may become
invalid before __clk_get() call. E.g. due to the clock provider driver
remove() callback being called in between of_clk_get_by_name() and
__clk_get().

Fix this by doing both the look up and __clk_get() operations with the
clock providers list mutex held. This ensures that the clock pointer
returned from __of_clk_get_from_provider() call and passed to __clk_get()
is valid, as long as the clock supplier module first removes its clock
provider instance and then does clk_unregister() on the corresponding
clocks.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-12-04 17:19:36 +01:00
..
keystone clk: keystone: Build Keystone clock drivers 2013-10-07 18:16:37 -07:00
mmp clk: add CLK_SET_RATE_NO_REPARENT flag 2013-08-19 12:27:17 -07:00
mvebu clk: armada-370: fix tclk frequencies 2013-10-06 17:39:46 -07:00
mxs ARM: mxs: remove custom .init_time hook 2013-09-29 21:09:34 +02:00
rockchip clk: add support for Rockchip gate clocks 2013-06-20 15:58:27 -07:00
samsung ARM: S3C64XX: Migrate clock handling to Common Clock Framework 2013-09-17 06:47:36 +09:00
socfpga clk: socfpga: Remove check for "reg" property in socfpga_clk_init 2013-11-27 12:48:51 -08:00
spear clk: add CLK_SET_RATE_NO_REPARENT flag 2013-08-19 12:27:17 -07:00
sunxi Allwinner sunXi SoCs clock changes 2013-12-01 12:42:45 -08:00
tegra The common clk framework changes for 3.12 are dominated by clock driver 2013-09-09 15:49:04 -07:00
ux500 clk: ux500: fix erroneous bit assignment 2013-10-18 13:25:28 +02:00
versatile clk: fixup argument order when setting VCO parameters 2013-10-07 23:01:07 -07:00
x86 ACPI / LPSS: add support for Intel BayTrail 2013-06-19 01:08:47 +02:00
zynq clk/zynq: Fix possible memory leak 2013-10-07 22:43:27 -07:00
clk-axi-clkgen.c clk: Add axi-clkgen driver 2013-03-19 17:20:30 -07:00
clk-bcm2835.c ARM: bcm2835: remove custom .init_time hook 2013-09-29 21:09:24 +02:00
clk-composite.c clk: composite: .determine_rate support 2013-11-10 11:39:07 +01:00
clk-devres.c ARM: 7537/1: clk: Fix release in devm_clk_put() 2012-09-19 21:51:27 +01:00
clk-divider.c clk: wrap I/O access for improved portability 2013-08-27 17:50:38 -07:00
clk-efm32gg.c clk: new driver for efm32 SoC 2013-11-04 12:23:18 -08:00
clk-fixed-factor.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
clk-fixed-rate.c clk: fixed-rate: Export clk_fixed_rate_register() 2013-08-16 12:08:50 -07:00
clk-gate.c clk: wrap I/O access for improved portability 2013-08-27 17:50:38 -07:00
clk-highbank.c ARM: highbank: remove custom .init_time hook 2013-09-29 21:09:29 +02:00
clk-ls1x.c clk: add Loongson1B clock support 2012-08-31 11:05:18 -07:00
clk-max77686.c clk: max77686: Avoid double free at remove time 2013-01-15 16:16:26 -08:00
clk-mux.c clk: wrap I/O access for improved portability 2013-08-27 17:50:38 -07:00
clk-nomadik.c clk: nomadik: fix missing __init on nomadik_src_init 2013-10-07 11:41:21 -07:00
clk-nspire.c clk: Add TI-Nspire clock drivers 2013-05-31 12:07:45 -07:00
clk-ppc-corenet.c powerpc: add missing explicit OF includes for ppc 2013-11-11 09:10:50 -06:00
clk-prima2.c clk: prima2: declare OF clock provider 2013-09-29 21:07:12 +02:00
clk-s2mps11.c clk: s2mps11: Add support for s2mps11 2013-08-08 15:57:33 -07:00
clk-si5351.c The common clock framework changes for 3.11 include new clock drivers 2013-07-03 11:54:50 -07:00
clk-si5351.h clk: si5351: Allow user to define disabled state for every clock output 2013-05-28 22:50:31 -07:00
clk-twl6040.c clk: use platform_{get,set}_drvdata() 2013-05-30 18:19:34 -07:00
clk-u300.c clk: u300: Fix incorrect placement of __initconst 2013-08-27 18:34:09 -07:00
clk-vt8500.c ARM: vt8500: prepare for arch-wide .init_time callback 2013-09-29 21:09:03 +02:00
clk-wm831x.c clk: wm831x: get rid of the implementation of remove function 2013-10-02 01:23:34 -07:00
clk-xgene.c clk: Add APM X-Gene SoC clock driver 2013-10-07 11:22:15 -07:00
clk.c clk: Provide not locked variant of of_clk_get_from_provider() 2013-12-04 17:19:30 +01:00
clk.h clk: Provide not locked variant of of_clk_get_from_provider() 2013-12-04 17:19:30 +01:00
clkdev.c clkdev: Fix race condition in clock lookup from device tree 2013-12-04 17:19:36 +01:00
Kconfig clk: keystone: Build Keystone clock drivers 2013-10-07 18:16:37 -07:00
Makefile clk: new driver for efm32 SoC 2013-11-04 12:23:18 -08:00