mirror of
https://github.com/dynup/kpatch
synced 2025-03-25 04:16:39 +00:00
create-diff-object: Mark correlated static local variables the SAME initially
Normal correlated symbols are marked the SAME initially but static local variables are correlated in a separate function. Also mark these the SAME. This fixes an issue where patching a function which called printk_once (which uses a static local variable) would fail to build because the static local variable was considered new and thus introduced a new data member into .data..read_mostly which is not allowed to change. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
This commit is contained in:
parent
fd911ab66c
commit
09ef2457cd
@ -767,6 +767,9 @@ static void kpatch_correlate_static_local_variables(struct kpatch_elf *base,
|
||||
sym->twin = patched_sym;
|
||||
patched_sym->twin = sym;
|
||||
|
||||
/* set initial status, might change */
|
||||
sym->status = patched_sym->status = SAME;
|
||||
|
||||
if (bundled) {
|
||||
sym->sec->twin = patched_sym->sec;
|
||||
patched_sym->sec->twin = sym->sec;
|
||||
|
Loading…
Reference in New Issue
Block a user