projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69eea5a
)
z3fold: fix spinlock unlocking in page reclaim
author
Vitaly Wool
<
[email protected]
>
Thu, 16 Mar 2017 23:40:19 +0000
(16:40 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 16 Mar 2017 23:56:18 +0000
(16:56 -0700)
Commmit
5a27aa822029
("z3fold: add kref refcounting") introduced a bug
in z3fold_reclaim_page() with function exit that may leave pool->lock
spinlock held. Here comes the trivial fix.
Fixes: 5a27aa822029 ("z3fold: add kref refcounting")
Link:
http://lkml.kernel.org/r/
[email protected]
Reported-by: Alexey Khoroshilov <
[email protected]
>
Signed-off-by: Vitaly Wool <
[email protected]
>
Cc: Dan Streetman <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/z3fold.c
patch
|
blob
|
history
diff --git
a/mm/z3fold.c
b/mm/z3fold.c
index 8970a2fd3b1a5354fb4bc843292a1c7358eed51c..f9492bccfd794a1983eabbc4bff32df35b31cea8 100644
(file)
--- a/
mm/z3fold.c
+++ b/
mm/z3fold.c
@@
-667,6
+667,7
@@
next:
z3fold_page_unlock(zhdr);
spin_lock(&pool->lock);
if (kref_put(&zhdr->refcount, release_z3fold_page)) {
+ spin_unlock(&pool->lock);
atomic64_dec(&pool->pages_nr);
return 0;
}