Skip to content
Commit 1102f9f8 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

modpost: do not make find_tosym() return NULL



As mentioned in commit 39758650 ("modpost: Add '.ltext' and
'.ltext.*' to TEXT_SECTIONS"), modpost can result in a segmentation
fault due to a NULL pointer dereference in default_mismatch_handler().

find_tosym() can return the original symbol pointer instead of NULL
if a better one is not found.

This fixes the reported segmentation fault.

Fixes: a23e7584 ("modpost: unify 'sym' and 'to' in default_mismatch_handler()")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 0316e4b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment