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:
47ec4ed
)
staging: zcache: fix refcount leak
author
Xiao Guangrong
<
[email protected]
>
Tue, 26 Jun 2012 08:49:46 +0000
(16:49 +0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Mon, 9 Jul 2012 18:31:15 +0000
(11:31 -0700)
In zcache_get_pool_by_id, the refcount of zcache_host is not increased, but
it is always decreased in zcache_put_pool
Acked-by: Seth Jennings <
[email protected]
>
Signed-off-by: Xiao Guangrong <
[email protected]
>
Acked-by: Konrad Rzeszutek Wilk <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/zcache/zcache-main.c
patch
|
blob
|
history
diff --git
a/drivers/staging/zcache/zcache-main.c
b/drivers/staging/zcache/zcache-main.c
index c9e08bbeb519884ab63f9e557a313e438829aaf2..55fbe3db7d5342ea013852d31c4051426097c6ad 100644
(file)
--- a/
drivers/staging/zcache/zcache-main.c
+++ b/
drivers/staging/zcache/zcache-main.c
@@
-946,8
+946,9
@@
static struct tmem_pool *zcache_get_pool_by_id(uint16_t cli_id, uint16_t poolid)
cli = &zcache_clients[cli_id];
if (cli == NULL)
goto out;
- atomic_inc(&cli->refcount);
}
+
+ atomic_inc(&cli->refcount);
pool = idr_find(&cli->tmem_pools, poolid);
if (pool != NULL)
atomic_inc(&pool->refcount);