Skip to content

Commit 4a24bba

Browse files
cmzxotehcaster
authored andcommitted
slab: delete useless RED_INACTIVE and RED_ACTIVE
These seem useless since we use the SLUB_RED_INACTIVE and SLUB_RED_ACTIVE, so just delete them, no functional change. Reviewed-by: Vlastimil Babka <[email protected]> Signed-off-by: Chengming Zhou <[email protected]> Reviewed-by: Christoph Lameter (Ampere) <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent adef2ae commit 4a24bba

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

include/linux/poison.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@
3838
* Magic nums for obj red zoning.
3939
* Placed in the first word before and the first word after an obj.
4040
*/
41-
#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */
42-
#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */
43-
44-
#define SLUB_RED_INACTIVE 0xbb
45-
#define SLUB_RED_ACTIVE 0xcc
41+
#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */
42+
#define SLUB_RED_ACTIVE 0xcc /* when obj is active */
4643

4744
/* ...and for poisoning */
4845
#define POISON_INUSE 0x5a /* for use-uninitialised poisoning */

mm/slub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,8 @@ static int check_bytes_and_report(struct kmem_cache *s, struct slab *slab,
12281228
* Padding is extended by another word if Redzoning is enabled and
12291229
* object_size == inuse.
12301230
*
1231-
* We fill with 0xbb (RED_INACTIVE) for inactive objects and with
1232-
* 0xcc (RED_ACTIVE) for objects in use.
1231+
* We fill with 0xbb (SLUB_RED_INACTIVE) for inactive objects and with
1232+
* 0xcc (SLUB_RED_ACTIVE) for objects in use.
12331233
*
12341234
* object + s->inuse
12351235
* Meta data starts here.

tools/include/linux/poison.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@
4747
* Magic nums for obj red zoning.
4848
* Placed in the first word before and the first word after an obj.
4949
*/
50-
#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */
51-
#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */
52-
53-
#define SLUB_RED_INACTIVE 0xbb
54-
#define SLUB_RED_ACTIVE 0xcc
50+
#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */
51+
#define SLUB_RED_ACTIVE 0xcc /* when obj is active */
5552

5653
/* ...and for poisoning */
5754
#define POISON_INUSE 0x5a /* for use-uninitialised poisoning */

0 commit comments

Comments
 (0)