slub.c (1bdd3e05a0a3b4a97ea88bc46fef8fb265c8b94c) slub.c (8e57f8acbbd121ecfb0c9dc13b8b030f86c6bd3b)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * SLUB: A slab allocator that limits cache line use instead of queuing
4 * objects in per cpu and per node lists.
5 *
6 * The allocator synchronizes using per slab locks or atomic operatios
7 * and only uses a centralized lock to manage a pool of partial slabs.
8 *

--- 274 unchanged lines hidden (view full) ---

283 prefetch(object + s->offset);
284}
285
286static inline void *get_freepointer_safe(struct kmem_cache *s, void *object)
287{
288 unsigned long freepointer_addr;
289 void *p;
290
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * SLUB: A slab allocator that limits cache line use instead of queuing
4 * objects in per cpu and per node lists.
5 *
6 * The allocator synchronizes using per slab locks or atomic operatios
7 * and only uses a centralized lock to manage a pool of partial slabs.
8 *

--- 274 unchanged lines hidden (view full) ---

283 prefetch(object + s->offset);
284}
285
286static inline void *get_freepointer_safe(struct kmem_cache *s, void *object)
287{
288 unsigned long freepointer_addr;
289 void *p;
290
291 if (!debug_pagealloc_enabled())
291 if (!debug_pagealloc_enabled_static())
292 return get_freepointer(s, object);
293
294 freepointer_addr = (unsigned long)object + s->offset;
295 probe_kernel_read(&p, (void **)freepointer_addr, sizeof(p));
296 return freelist_ptr(s, p, freepointer_addr);
297}
298
299static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp)

--- 5625 unchanged lines hidden ---
292 return get_freepointer(s, object);
293
294 freepointer_addr = (unsigned long)object + s->offset;
295 probe_kernel_read(&p, (void **)freepointer_addr, sizeof(p));
296 return freelist_ptr(s, p, freepointer_addr);
297}
298
299static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp)

--- 5625 unchanged lines hidden ---