Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jan 2011 16:38:01 +0000 (08:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jan 2011 16:38:01 +0000 (08:38 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: Fix a crash during slabinfo -v
  tracing/slab: Move kmalloc tracepoint out of inline code
  slub: Fix slub_lock down/up imbalance
  slub: Fix build breakage in Documentation/vm
  slub tracing: move trace calls out of always inlined functions to reduce kernel code size
  slub: move slabinfo.c to tools/slub/slabinfo.c

1  2 
mm/slab.c
mm/slub.c

diff --cc mm/slab.c
+++ b/mm/slab.c
@@@ -3653,13 -3653,50 +3653,20 @@@ void *kmem_cache_alloc(struct kmem_cach
  EXPORT_SYMBOL(kmem_cache_alloc);
  
  #ifdef CONFIG_TRACING
- void *kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags)
+ void *
+ kmem_cache_alloc_trace(size_t size, struct kmem_cache *cachep, gfp_t flags)
  {
-       return __cache_alloc(cachep, flags, __builtin_return_address(0));
+       void *ret;
+       ret = __cache_alloc(cachep, flags, __builtin_return_address(0));
+       trace_kmalloc(_RET_IP_, ret,
+                     size, slab_buffer_size(cachep), flags);
+       return ret;
  }
- EXPORT_SYMBOL(kmem_cache_alloc_notrace);
+ EXPORT_SYMBOL(kmem_cache_alloc_trace);
  #endif
  
 -/**
 - * kmem_ptr_validate - check if an untrusted pointer might be a slab entry.
 - * @cachep: the cache we're checking against
 - * @ptr: pointer to validate
 - *
 - * This verifies that the untrusted pointer looks sane;
 - * it is _not_ a guarantee that the pointer is actually
 - * part of the slab cache in question, but it at least
 - * validates that the pointer can be dereferenced and
 - * looks half-way sane.
 - *
 - * Currently only used for dentry validation.
 - */
 -int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)
 -{
 -      unsigned long size = cachep->buffer_size;
 -      struct page *page;
 -
 -      if (unlikely(!kern_ptr_validate(ptr, size)))
 -              goto out;
 -      page = virt_to_page(ptr);
 -      if (unlikely(!PageSlab(page)))
 -              goto out;
 -      if (unlikely(page_get_cache(page) != cachep))
 -              goto out;
 -      return 1;
 -out:
 -      return 0;
 -}
 -
  #ifdef CONFIG_NUMA
  void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
  {
diff --cc mm/slub.c
Simple merge