summaryrefslogtreecommitdiff
path: root/kernel/futex/requeue.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-05-30 12:01:38 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2022-06-05 00:20:57 +0300
commit8c9ce89c5b63028dd3be43807f10b009cd2c6e51 (patch)
tree05718b142e802d81023a13df9b75aee0dc692f83 /kernel/futex/requeue.c
parentb42d2306502419688190aa6dd4dab4a6def24b3d (diff)
downloadlinux-8c9ce89c5b63028dd3be43807f10b009cd2c6e51.tar.xz
modpost: simplify mod->name allocation
mod->name is set to the ELF filename with the suffix ".o" stripped. The current code calls strdup() and free() to manipulate the string, but a simpler approach is to pass new_module() with the name length subtracted by 2. Also, check if the passed filename ends with ".o" before stripping it. The current code blindly chops the suffix: tmp[strlen(tmp) - 2] = '\0' It will cause buffer under-run if strlen(tmp) < 2; Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'kernel/futex/requeue.c')
0 files changed, 0 insertions, 0 deletions