diff options
author | Len Brown <len.brown@intel.com> | 2006-06-29 19:57:46 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-29 19:57:46 -0400 |
commit | d120cfb544ed6161b9d32fb6c4648c471807ee6b (patch) | |
tree | 7757ad0198d8df76ff5c60f939a687687c41da00 /mm/slab.c | |
parent | 9dce0e950dbfab4148f35ac6f297d8638cdc63c4 (diff) | |
parent | bf7e8511088963078484132636839b59e25cf14f (diff) |
merge linus into release branch
Conflicts:
drivers/acpi/acpi_memhotplug.c
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -89,6 +89,7 @@ | |||
89 | #include <linux/config.h> | 89 | #include <linux/config.h> |
90 | #include <linux/slab.h> | 90 | #include <linux/slab.h> |
91 | #include <linux/mm.h> | 91 | #include <linux/mm.h> |
92 | #include <linux/poison.h> | ||
92 | #include <linux/swap.h> | 93 | #include <linux/swap.h> |
93 | #include <linux/cache.h> | 94 | #include <linux/cache.h> |
94 | #include <linux/interrupt.h> | 95 | #include <linux/interrupt.h> |
@@ -106,6 +107,7 @@ | |||
106 | #include <linux/nodemask.h> | 107 | #include <linux/nodemask.h> |
107 | #include <linux/mempolicy.h> | 108 | #include <linux/mempolicy.h> |
108 | #include <linux/mutex.h> | 109 | #include <linux/mutex.h> |
110 | #include <linux/rtmutex.h> | ||
109 | 111 | ||
110 | #include <asm/uaccess.h> | 112 | #include <asm/uaccess.h> |
111 | #include <asm/cacheflush.h> | 113 | #include <asm/cacheflush.h> |
@@ -492,17 +494,6 @@ struct kmem_cache { | |||
492 | #endif | 494 | #endif |
493 | 495 | ||
494 | #if DEBUG | 496 | #if DEBUG |
495 | /* | ||
496 | * Magic nums for obj red zoning. | ||
497 | * Placed in the first word before and the first word after an obj. | ||
498 | */ | ||
499 | #define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ | ||
500 | #define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ | ||
501 | |||
502 | /* ...and for poisoning */ | ||
503 | #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ | ||
504 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | ||
505 | #define POISON_END 0xa5 /* end-byte of poisoning */ | ||
506 | 497 | ||
507 | /* | 498 | /* |
508 | * memory layout of objects: | 499 | * memory layout of objects: |
@@ -1083,7 +1074,7 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) | |||
1083 | 1074 | ||
1084 | #endif | 1075 | #endif |
1085 | 1076 | ||
1086 | static int cpuup_callback(struct notifier_block *nfb, | 1077 | static int __devinit cpuup_callback(struct notifier_block *nfb, |
1087 | unsigned long action, void *hcpu) | 1078 | unsigned long action, void *hcpu) |
1088 | { | 1079 | { |
1089 | long cpu = (long)hcpu; | 1080 | long cpu = (long)hcpu; |
@@ -1265,7 +1256,9 @@ bad: | |||
1265 | return NOTIFY_BAD; | 1256 | return NOTIFY_BAD; |
1266 | } | 1257 | } |
1267 | 1258 | ||
1268 | static struct notifier_block cpucache_notifier = { &cpuup_callback, NULL, 0 }; | 1259 | static struct notifier_block __cpuinitdata cpucache_notifier = { |
1260 | &cpuup_callback, NULL, 0 | ||
1261 | }; | ||
1269 | 1262 | ||
1270 | /* | 1263 | /* |
1271 | * swap the static kmem_list3 with kmalloced memory | 1264 | * swap the static kmem_list3 with kmalloced memory |
@@ -3405,7 +3398,7 @@ void kfree(const void *objp) | |||
3405 | local_irq_save(flags); | 3398 | local_irq_save(flags); |
3406 | kfree_debugcheck(objp); | 3399 | kfree_debugcheck(objp); |
3407 | c = virt_to_cache(objp); | 3400 | c = virt_to_cache(objp); |
3408 | mutex_debug_check_no_locks_freed(objp, obj_size(c)); | 3401 | debug_check_no_locks_freed(objp, obj_size(c)); |
3409 | __cache_free(c, (void *)objp); | 3402 | __cache_free(c, (void *)objp); |
3410 | local_irq_restore(flags); | 3403 | local_irq_restore(flags); |
3411 | } | 3404 | } |