mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
soc: qcom: Block register minidump region with same name
If user register minidump region with same name, return -EEXIST error code. Change-Id: I612a7a4f77fdd80d3b677b2b2b4e4d1221c3395f Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
This commit is contained in:
parent
db78883a87
commit
f7845a840c
|
|
@ -681,6 +681,11 @@ int msm_minidump_add_region(const struct md_region *entry)
|
|||
md_add_elf_header(entry);
|
||||
/* Ensure that init completes before register region */
|
||||
} else if (is_rm_minidump && smp_load_acquire(&md_init_done)) {
|
||||
if (md_rm_entry_num(entry) >= 0) {
|
||||
printk_deferred("Entry name already exist\n");
|
||||
ret = -EEXIST;
|
||||
goto out;
|
||||
}
|
||||
ret = md_rm_add_region(entry);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user