radeon: Take drm struct_mutex over reclocking
[safe/jmp/linux-2.6] / mm / slub.c
index 3525a4e..7d6c8b1 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2075,7 +2075,7 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s, gfp_t flags)
                 * Boot time creation of the kmalloc array. Use static per cpu data
                 * since the per cpu allocator is not available yet.
                 */
-               s->cpu_slab = per_cpu_var(kmalloc_percpu) + (s - kmalloc_caches);
+               s->cpu_slab = kmalloc_percpu + (s - kmalloc_caches);
        else
                s->cpu_slab =  alloc_percpu(struct kmem_cache_cpu);
 
@@ -2386,6 +2386,9 @@ int kmem_ptr_validate(struct kmem_cache *s, const void *object)
 {
        struct page *page;
 
+       if (!kern_ptr_validate(object, s->size))
+               return 0;
+
        page = get_object_page(object);
 
        if (!page || s != page->slab)
@@ -2960,7 +2963,7 @@ static void slab_mem_offline_callback(void *arg)
                        /*
                         * if n->nr_slabs > 0, slabs still exist on the node
                         * that is going down. We were unable to free them,
-                        * and offline_pages() function shoudn't call this
+                        * and offline_pages() function shouldn't call this
                         * callback. So, we must fail.
                         */
                        BUG_ON(slabs_node(s, offline_node));
@@ -4390,7 +4393,7 @@ static void kmem_cache_release(struct kobject *kobj)
        kfree(s);
 }
 
-static struct sysfs_ops slab_sysfs_ops = {
+static const struct sysfs_ops slab_sysfs_ops = {
        .show = slab_attr_show,
        .store = slab_attr_store,
 };
@@ -4409,7 +4412,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj)
        return 0;
 }
 
-static struct kset_uevent_ops slab_uevent_ops = {
+static const struct kset_uevent_ops slab_uevent_ops = {
        .filter = uevent_filter,
 };