mirror of
https://github.com/dynup/kpatch
synced 2025-03-11 05:07:53 +00:00
integration/centos-7: fix shadow-newpid.patch warnings
When quickly loading/unloading this patch multiple times it is possible to hit "Duplicate shadow variable" warnings since the patch doesn't have any cleanup hooks on unload. Switch to klp_shadow_get_or_alloc to ignore these. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
9999608062
commit
56be80720a
@ -63,7 +63,7 @@ Index: src/kernel/fork.c
|
||||
+ int *newpid;
|
||||
+ static int ctr = 0;
|
||||
+
|
||||
+ newpid = klp_shadow_alloc(p, 0, sizeof(*newpid),
|
||||
+ newpid = klp_shadow_get_or_alloc(p, 0, sizeof(*newpid),
|
||||
+ GFP_KERNEL, NULL, NULL);
|
||||
+ if (newpid)
|
||||
+ *newpid = ctr++;
|
||||
|
Loading…
Reference in New Issue
Block a user