Commit 1102f9f
committed
modpost: do not make find_tosym() return NULL
As mentioned in commit 3975865 ("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: a23e758 ("modpost: unify 'sym' and 'to' in default_mismatch_handler()")
Reported-by: Nathan Chancellor <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>1 parent 0316e4b commit 1102f9f
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| |||
1015 | 1017 | | |
1016 | 1018 | | |
1017 | 1019 | | |
1018 | | - | |
1019 | | - | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1020 | 1023 | | |
1021 | 1024 | | |
1022 | 1025 | | |
| |||
0 commit comments