aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-19 12:28:10 -0800
committerBrian Behlendorf <[email protected]>2009-02-19 12:28:10 -0800
commita1cf80b493137b00d9111d4d15405a12237ea9bd (patch)
tree95a273e4fc5f028e348d1ccff56836c8fb11a06e
parent99639e4a13306c3809b52e487d4343d756fad2e2 (diff)
Matching kmem_free() fix for use after free case.
See commit bb01879ebe5ba5d8e2c2177d3b1ce0272c17ce07 for a full description. This issue should have been addressed in the same commit but it slipped my mind.
-rw-r--r--include/sys/kmem.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h
index 278039ec9..318cf5ee8 100644
--- a/include/sys/kmem.h
+++ b/include/sys/kmem.h
@@ -126,9 +126,9 @@ extern void vmem_free_debug(void *ptr, size_t size);
#else /* DEBUG_KMEM */
-# define kmem_alloc(size, flags) kmalloc((size), (flags))
-# define kmem_zalloc(size, flags) kzalloc((size), (flags))
-# define kmem_free(ptr, size) (kfree(ptr), (void)(size))
+# define kmem_alloc(size, flags) kmalloc((size), (flags))
+# define kmem_zalloc(size, flags) kzalloc((size), (flags))
+# define kmem_free(ptr, size) ((void)(size), kfree(ptr))
# ifdef HAVE_KMALLOC_NODE
# define kmem_alloc_node(size, flags, node) \
@@ -138,8 +138,8 @@ extern void vmem_free_debug(void *ptr, size_t size);
kmalloc((size), (flags))
# endif
-# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \
- __GFP_HIGHMEM), PAGE_KERNEL)
+# define vmem_alloc(size, flags) __vmalloc((size), ((flags) | \
+ __GFP_HIGHMEM), PAGE_KERNEL)
# define vmem_zalloc(size, flags) \
({ \
void *_ptr_ = __vmalloc((size),((flags)|__GFP_HIGHMEM),PAGE_KERNEL); \