summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 11:26:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 11:26:14 -0700
commitb9d2252c1e44fa83a4e65fdc9eb93db6297c55af (patch)
tree7db5a11d1d57a56fc330b8313680bbbe4eb3a564 /mm/slub.c
parentb312bf359e20cc39c00d480fd40a24c245d80bf7 (diff)
parente79aec291da55aa322ddb5d8f3bb04cdf69470d5 (diff)
downloadlinux-b9d2252c1e44fa83a4e65fdc9eb93db6297c55af.tar.bz2
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slab: rename slab_destroy_objs slub: current is always valid slub: Add check for kfree() of non slab objects.
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 5f6e2c4a2ba7..488400d10700 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -411,7 +411,7 @@ static void set_track(struct kmem_cache *s, void *object,
if (addr) {
p->addr = addr;
p->cpu = smp_processor_id();
- p->pid = current ? current->pid : -1;
+ p->pid = current->pid;
p->when = jiffies;
} else
memset(p, 0, sizeof(struct track));
@@ -2766,6 +2766,7 @@ void kfree(const void *x)
page = virt_to_head_page(x);
if (unlikely(!PageSlab(page))) {
+ BUG_ON(!PageCompound(page));
put_page(page);
return;
}