Skip to content
Commit 44f6a42d authored by Jann Horn's avatar Jann Horn Committed by Vlastimil Babka
Browse files

mm/slub: refactor freelist to use custom type



Currently the SLUB code represents encoded freelist entries as "void*".
That's misleading, those things are encoded under
CONFIG_SLAB_FREELIST_HARDENED so that they're not actually dereferencable.

Give them their own type, and split freelist_ptr() into one function per
direction (one for encoding, one for decoding).

Signed-off-by: default avatarJann Horn <jannh@google.com>
Co-developed-by: default avatarMatteo Rizzo <matteorizzo@google.com>
Signed-off-by: default avatarMatteo Rizzo <matteorizzo@google.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 06c2afb8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment