diff options
| author | Paolo Bonzini <[email protected]> | 2024-04-19 08:57:14 -0400 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2024-04-19 09:02:22 -0400 |
| commit | a96cb3bf390eebfead5fc7a2092f8452a7997d1b (patch) | |
| tree | d0e16dc3e903ce705f85c4c334d750b4b304a0f0 /scripts/mod/modpost.c | |
| parent | 1ab157ce573f5abd932b72679a7c67b1ed0bff13 (diff) | |
| parent | b377c66ae3509ccea596512d6afb4777711c4870 (diff) | |
Merge x86 bugfixes from Linux 6.9-rc3
Pull fix for SEV-SNP late disable bugs.
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'scripts/mod/modpost.c')
| -rw-r--r-- | scripts/mod/modpost.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 6b37039c9e92..2f5b91da5afa 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1007,6 +1007,8 @@ static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr, static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) { + Elf_Sym *new_sym; + /* If the supplied symbol has a valid name, return it */ if (is_valid_name(elf, sym)) return sym; @@ -1015,8 +1017,9 @@ static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) * Strive to find a better symbol name, but the resulting name may not * match the symbol referenced in the original code. */ - return symsearch_find_nearest(elf, addr, get_secindex(elf, sym), - true, 20); + new_sym = symsearch_find_nearest(elf, addr, get_secindex(elf, sym), + true, 20); + return new_sym ? new_sym : sym; } static bool is_executable_section(struct elf_info *elf, unsigned int secndx) |