OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
zsmalloc: fix a null pointer dereference in destroy_handle_cache()
[uclinux-h8/linux.git]
/
mm
/
zsmalloc.c
diff --git
a/mm/zsmalloc.c
b/mm/zsmalloc.c
index
08bd7a3
..
a8b5e74
100644
(file)
--- a/
mm/zsmalloc.c
+++ b/
mm/zsmalloc.c
@@
-289,7
+289,8
@@
static int create_handle_cache(struct zs_pool *pool)
static void destroy_handle_cache(struct zs_pool *pool)
{
- kmem_cache_destroy(pool->handle_cachep);
+ if (pool->handle_cachep)
+ kmem_cache_destroy(pool->handle_cachep);
}
static unsigned long alloc_handle(struct zs_pool *pool)