ANDROID: kernel: Fix passing NULL to __pa_symbol()
If passing ZERO(NULL) to __pa_symbol() would trigger a BUG() when CONFIG_DEBUG_VIRTUAL=y Bug: 190334261 Signed-off-by: Jone Chou <jonechou@google.com> Change-Id: I78837a268b7e340f2658e0b831c9f2b5453aa3f0
This commit is contained in:
parent
27c285003d
commit
00dc4c64e6
1 changed files with 6 additions and 3 deletions
|
|
@ -140,14 +140,17 @@ static int debug_kinfo_probe(struct platform_device *pdev)
|
|||
info->bit_per_long = BITS_PER_LONG;
|
||||
info->module_name_len = MODULE_NAME_LEN;
|
||||
info->symbol_len = KSYM_SYMBOL_LEN;
|
||||
info->_addresses_pa = (u64)__pa_symbol((volatile void *)kallsyms_addresses);
|
||||
info->_relative_pa = (u64)__pa_symbol((volatile void *)kallsyms_relative_base);
|
||||
if (!info->enabled_base_relative)
|
||||
info->_addresses_pa = (u64)__pa_symbol((volatile void *)kallsyms_addresses);
|
||||
else {
|
||||
info->_relative_pa = (u64)__pa_symbol((volatile void *)kallsyms_relative_base);
|
||||
info->_offsets_pa = (u64)__pa_symbol((volatile void *)kallsyms_offsets);
|
||||
}
|
||||
info->_stext_pa = (u64)__pa_symbol(_stext);
|
||||
info->_etext_pa = (u64)__pa_symbol(_etext);
|
||||
info->_sinittext_pa = (u64)__pa_symbol(_sinittext);
|
||||
info->_einittext_pa = (u64)__pa_symbol(_einittext);
|
||||
info->_end_pa = (u64)__pa_symbol(_end);
|
||||
info->_offsets_pa = (u64)__pa_symbol((volatile void *)kallsyms_offsets);
|
||||
info->_names_pa = (u64)__pa_symbol((volatile void *)kallsyms_names);
|
||||
info->_token_table_pa = (u64)__pa_symbol((volatile void *)kallsyms_token_table);
|
||||
info->_token_index_pa = (u64)__pa_symbol((volatile void *)kallsyms_token_index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue