This is a note to let you know that I've just added the patch titled
clk: Really fix deadlock with mmap_sem
to the 3.18-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-really-fix-deadlock-with-mmap_sem.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 89f7e9de59bf3e3cda2e00de12c66db22675a7cf Mon Sep 17 00:00:00 2001
From: Stephen Boyd <[email protected]>
Date: Fri, 12 Dec 2014 15:04:16 -0800
Subject: clk: Really fix deadlock with mmap_sem
From: Stephen Boyd <[email protected]>
commit 89f7e9de59bf3e3cda2e00de12c66db22675a7cf upstream.
Commit 6314b6796e3c (clk: Don't hold prepare_lock across debugfs
creation, 2014-09-04) forgot to update one place where we hold
the prepare_lock while creating debugfs directories. This means
we still have the chance of a deadlock that the commit was trying
to fix. Actually fix it by moving the debugfs creation outside
the prepare_lock.
Reported-by: Russell King <[email protected]>
Fixes: 6314b6796e3c "clk: Don't hold prepare_lock across debugfs creation"
Signed-off-by: Stephen Boyd <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
[[email protected]: removed lockdep_assert]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/clk/clk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -240,7 +240,6 @@ static const struct file_operations clk_
.release = single_release,
};
-/* caller must hold prepare_lock */
static int clk_debug_create_one(struct clk *clk, struct dentry *pdentry)
{
struct dentry *d;
@@ -1944,7 +1943,6 @@ int __clk_init(struct device *dev, struc
else
clk->rate = 0;
- clk_debug_register(clk);
/*
* walk the list of orphan clocks and reparent any that are children of
* this clock
@@ -1979,6 +1977,9 @@ int __clk_init(struct device *dev, struc
out:
clk_prepare_unlock();
+ if (!ret)
+ clk_debug_register(clk);
+
return ret;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/clk-really-fix-deadlock-with-mmap_sem.patch
queue-3.18/clk-don-t-try-to-use-a-struct-clk-after-it-could-have-been-freed.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html