Skip to contentSkip to conversation

module: stats: fix invalid_mod_bytes typo

PATCH Applied Arnd Bergmann 3 participants 3 messages Apr 18, 2023 Module support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module: stats: fix invalid_mod_bytes typo

From: Arnd Bergmann <[email protected]>

This was caught by randconfig builds but does not show up in build testing without CONFIG_MODULE_DECOMPRESS:

kernel/module/stats.c: In function 'mod_stat_bump_invalid':
kernel/module/stats.c:229:42: error: 'invalid_mod_byte' undeclared (first use in this function); did you mean 'invalid_mod_bytes'?

  229 |   atomic_long_add(info->compressed_len, &invalid_mod_byte);
      |                                          ^~~~~~~~~~~~~~~~
      |                                          invalid_mod_bytes
Fixes 0d4ab68ce983 ("module: add debug stats to help identify memory pressure")

---
This was probably already reported, sending the fix just in case everyone else else missed it so far.

---
 kernel/module/stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/module/stats.c +1 -1
index cdcd60695399..32959ec9581f 100644
@@ -226,7 +226,7 @@ void mod_stat_bump_invalid(struct load_info *info, int flags)
 	atomic_inc(&failed_load_modules);
 #if defined(CONFIG_MODULE_DECOMPRESS)
 	if (flags & MODULE_INIT_COMPRESSED_FILE)
-		atomic_long_add(info->compressed_len, &invalid_mod_byte);
+		atomic_long_add(info->compressed_len, &invalid_mod_bytes);
 #endif
 }
 
Signature · 1 line
2.39.2
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This was caught by randconfig builds but does not show up in build testing without CONFIG_MODULE_DECOMPRESS:

Quoted 8 lines

kernel/module/stats.c: In function 'mod_stat_bump_invalid':
kernel/module/stats.c:229:42: error: 'invalid_mod_byte' undeclared (first use in this function); did you mean 'invalid_mod_bytes'?

  229 |   atomic_long_add(info->compressed_len, &invalid_mod_byte);
      |                                          ^~~~~~~~~~~~~~~~
      |                                          invalid_mod_bytes
Fixes 0d4ab68ce983 ("module: add debug stats to help identify memory pressure")

Thanks.

Quoted 20 lines

---
This was probably already reported, sending the fix just in case everyone else else missed it so far.

---
 kernel/module/stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/module/stats.c +1 -1
index cdcd60695399..32959ec9581f 100644
@@ -226,7 +226,7 @@ void mod_stat_bump_invalid(struct load_info *info, int flags)
 	atomic_inc(&failed_load_modules);
 #if defined(CONFIG_MODULE_DECOMPRESS)
 	if (flags & MODULE_INIT_COMPRESSED_FILE)
-		atomic_long_add(info->compressed_len, &invalid_mod_byte);
+		atomic_long_add(info->compressed_len, &invalid_mod_bytes);
 #endif
 }
 
Signature · 1 line
~Randy
maintainer Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This was caught by randconfig builds but does not show up in build testing without CONFIG_MODULE_DECOMPRESS:

kernel/module/stats.c: In function 'mod_stat_bump_invalid':
kernel/module/stats.c:229:42: error: 'invalid_mod_byte' undeclared (first use in this function); did you mean 'invalid_mod_bytes'?

  229 |   atomic_long_add(info->compressed_len, &invalid_mod_byte);
      |                                          ^~~~~~~~~~~~~~~~
      |                                          invalid_mod_bytes
Quoted 5 lines
Fixes 0d4ab68ce983 ("module: add debug stats to help identify memory pressure")

---
This was probably already reported, sending the fix just in case everyone else else missed it so far.

Oh it was a decompression ifdef, that's why I didn't catch it! But also I guess 0-day isn't running tests with it enabled either!

Thanks! Applied and pushed!

Luis