summaryrefslogtreecommitdiff
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-08-23 15:03:44 (GMT)
committerSylwester Nawrocki <s.nawrocki@samsung.com>2013-12-04 16:19:36 (GMT)
commit3a3d2b0551d79ef476ef57424beeb8f68789fbcd (patch)
tree8dd517d6650876376d1d4e18b605b56fc59ace4b /kernel/seccomp.c
parentd6782c263661abd6c7e8a375141d69fdc457f9e1 (diff)
downloadlinux-3a3d2b0551d79ef476ef57424beeb8f68789fbcd.tar.xz
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>
Diffstat (limited to 'kernel/seccomp.c')
0 files changed, 0 insertions, 0 deletions