Skip to content

Commit

Permalink
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/penberg/slab-2.6

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: fix check_bytes() for slub debugging
  slub: Fix full list corruption if debugging is on
  • Loading branch information
Linus Torvalds committed Aug 9, 2011
2 parents 6bb615b + ef62fb3 commit e6a99d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ static u8 *check_bytes(u8 *start, u8 value, unsigned int bytes)
return check_bytes8(start, value, bytes);

value64 = value | value << 8 | value << 16 | value << 24;
value64 = value64 | value64 << 32;
value64 = (value64 & 0xffffffff) | value64 << 32;
prefix = 8 - ((unsigned long)start) % 8;

if (prefix) {
Expand Down Expand Up @@ -2387,11 +2387,13 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
slab_empty:
if (prior) {
/*
* Slab still on the partial list.
* Slab on the partial list.
*/
remove_partial(n, page);
stat(s, FREE_REMOVE_PARTIAL);
}
} else
/* Slab must be on the full list */
remove_full(s, page);

spin_unlock_irqrestore(&n->list_lock, flags);
stat(s, FREE_SLAB);
Expand Down

0 comments on commit e6a99d3

Please sign in to comment.