diff options
| author | Max Kellermann <[email protected]> | 2024-02-15 14:13:21 +0000 |
|---|---|---|
| committer | Masahiro Yamada <[email protected]> | 2024-03-18 17:30:03 +0000 |
| commit | 23dfd914d2bfc4c9938b0084dffd7105de231d98 (patch) | |
| tree | d272c01076fb9d798642495a9f413df577b4afdf /tools/lib/api/debug-internal.h | |
| parent | kbuild: remove GCC's default -Wpacked-bitfield-compat flag (diff) | |
| download | kernel-23dfd914d2bfc4c9938b0084dffd7105de231d98.tar.gz kernel-23dfd914d2bfc4c9938b0084dffd7105de231d98.zip | |
modpost: fix null pointer dereference
If the find_fromsym() call fails and returns NULL, the warn() call
will dereference this NULL pointer and cause the program to crash.
This happened when I tried to build with "test_user_copy" module.
With this fix, it prints lots of warnings like this:
WARNING: modpost: lib/test_user_copy: section mismatch in reference: (unknown)+0x4 (section: .text.fixup) -> (unknown) (section: .init.text)
[email protected]:
The issue is reproduced with ARCH=arm allnoconfig + CONFIG_MODULES=y +
CONFIG_RUNTIME_TESTING_MENU=y + CONFIG_TEST_USER_COPY=m
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'tools/lib/api/debug-internal.h')
0 files changed, 0 insertions, 0 deletions
