aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 14:38:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 14:38:31 -0700
commitd111c9f0344a5e2454726553c663d25e24e38555 (patch)
treedfc43f93831782d5e1e99f157a6fe37f81f10abe /samples
parentMerge tag 'for-linus-5.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip (diff)
parentMerge branch 'for-5.18/selftests-fixes' into for-linus (diff)
downloadlinux-dev-d111c9f0344a5e2454726553c663d25e24e38555.tar.xz
linux-dev-d111c9f0344a5e2454726553c663d25e24e38555.zip
Merge tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
Pull livepatching updates from Petr Mladek: - Forced transitions block only to-be-removed livepatches [Chengming] - Detect when ftrace handler could not be disabled in self-tests [David] - Calm down warning from a static analyzer [Tom] * tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Reorder to use before freeing a pointer livepatch: Don't block removal of patches that are safe to unload livepatch: Skip livepatch tests if ftrace cannot be configured
Diffstat (limited to 'samples')
-rw-r--r--samples/livepatch/livepatch-shadow-fix1.c2
-rw-r--r--samples/livepatch/livepatch-shadow-fix2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/samples/livepatch/livepatch-shadow-fix1.c b/samples/livepatch/livepatch-shadow-fix1.c
index 918ce17b43fd..6701641bf12d 100644
--- a/samples/livepatch/livepatch-shadow-fix1.c
+++ b/samples/livepatch/livepatch-shadow-fix1.c
@@ -109,9 +109,9 @@ static void livepatch_fix1_dummy_leak_dtor(void *obj, void *shadow_data)
void *d = obj;
int **shadow_leak = shadow_data;
- kfree(*shadow_leak);
pr_info("%s: dummy @ %p, prevented leak @ %p\n",
__func__, d, *shadow_leak);
+ kfree(*shadow_leak);
}
static void livepatch_fix1_dummy_free(struct dummy *d)
diff --git a/samples/livepatch/livepatch-shadow-fix2.c b/samples/livepatch/livepatch-shadow-fix2.c
index 29fe5cd42047..361046a4f10c 100644
--- a/samples/livepatch/livepatch-shadow-fix2.c
+++ b/samples/livepatch/livepatch-shadow-fix2.c
@@ -61,9 +61,9 @@ static void livepatch_fix2_dummy_leak_dtor(void *obj, void *shadow_data)
void *d = obj;
int **shadow_leak = shadow_data;
- kfree(*shadow_leak);
pr_info("%s: dummy @ %p, prevented leak @ %p\n",
__func__, d, *shadow_leak);
+ kfree(*shadow_leak);
}
static void livepatch_fix2_dummy_free(struct dummy *d)