@@ -1021,7 +1021,7 @@ static int check_pad_bytes(struct kmem_cache *s, struct slab *slab, u8 *p)
1021
1021
}
1022
1022
1023
1023
/* Check the pad bytes at the end of a slab page */
1024
- static int slab_pad_check (struct kmem_cache * s , struct slab * slab )
1024
+ static void slab_pad_check (struct kmem_cache * s , struct slab * slab )
1025
1025
{
1026
1026
u8 * start ;
1027
1027
u8 * fault ;
@@ -1031,21 +1031,21 @@ static int slab_pad_check(struct kmem_cache *s, struct slab *slab)
1031
1031
int remainder ;
1032
1032
1033
1033
if (!(s -> flags & SLAB_POISON ))
1034
- return 1 ;
1034
+ return ;
1035
1035
1036
1036
start = slab_address (slab );
1037
1037
length = slab_size (slab );
1038
1038
end = start + length ;
1039
1039
remainder = length % s -> size ;
1040
1040
if (!remainder )
1041
- return 1 ;
1041
+ return ;
1042
1042
1043
1043
pad = end - remainder ;
1044
1044
metadata_access_enable ();
1045
1045
fault = memchr_inv (kasan_reset_tag (pad ), POISON_INUSE , remainder );
1046
1046
metadata_access_disable ();
1047
1047
if (!fault )
1048
- return 1 ;
1048
+ return ;
1049
1049
while (end > fault && end [-1 ] == POISON_INUSE )
1050
1050
end -- ;
1051
1051
@@ -1054,7 +1054,6 @@ static int slab_pad_check(struct kmem_cache *s, struct slab *slab)
1054
1054
print_section (KERN_ERR , "Padding " , pad , remainder );
1055
1055
1056
1056
restore_bytes (s , "slab padding" , POISON_INUSE , fault , end );
1057
- return 0 ;
1058
1057
}
1059
1058
1060
1059
static int check_object (struct kmem_cache * s , struct slab * slab ,
@@ -1642,8 +1641,7 @@ static inline int free_debug_processing(
1642
1641
void * head , void * tail , int bulk_cnt ,
1643
1642
unsigned long addr ) { return 0 ; }
1644
1643
1645
- static inline int slab_pad_check (struct kmem_cache * s , struct slab * slab )
1646
- { return 1 ; }
1644
+ static inline void slab_pad_check (struct kmem_cache * s , struct slab * slab ) {}
1647
1645
static inline int check_object (struct kmem_cache * s , struct slab * slab ,
1648
1646
void * object , u8 val ) { return 1 ; }
1649
1647
static inline void add_full (struct kmem_cache * s , struct kmem_cache_node * n ,
0 commit comments