diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-27 10:54:24 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-27 10:54:24 -0800 |
| commit | 715d1285695382b5074e49a0fe475b9ba56a1101 (patch) | |
| tree | 9d79af4ac798bb93567ccfcbf66c2db6adca3791 /samples/livepatch/livepatch-shadow-mod.c | |
| parent | 12fb2b993e1508a0d9032a2314dfdda2a3a5535e (diff) | |
| parent | f46e49a9cc3814f3564477f0fffc00e0a2bc9e80 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
Pull livepatching updates from Jiri Kosina:
"Fixes for selftests and samples for 'shadow variables' livepatching
feature, from Petr Mladek"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
livepatch: Handle allocation failure in the sample of shadow variable API
livepatch/samples/selftest: Use klp_shadow_alloc() API correctly
livepatch/selftest: Clean up shadow variable names and type
livepatch/sample: Use the right type for the leaking data pointer
Diffstat (limited to 'samples/livepatch/livepatch-shadow-mod.c')
| -rw-r--r-- | samples/livepatch/livepatch-shadow-mod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/livepatch/livepatch-shadow-mod.c b/samples/livepatch/livepatch-shadow-mod.c index ecfe83a943a7..7e753b0d2fa6 100644 --- a/samples/livepatch/livepatch-shadow-mod.c +++ b/samples/livepatch/livepatch-shadow-mod.c @@ -95,7 +95,7 @@ struct dummy { static __used noinline struct dummy *dummy_alloc(void) { struct dummy *d; - void *leak; + int *leak; d = kzalloc(sizeof(*d), GFP_KERNEL); if (!d) @@ -105,7 +105,7 @@ static __used noinline struct dummy *dummy_alloc(void) msecs_to_jiffies(1000 * EXPIRE_PERIOD); /* Oops, forgot to save leak! */ - leak = kzalloc(sizeof(int), GFP_KERNEL); + leak = kzalloc(sizeof(*leak), GFP_KERNEL); if (!leak) { kfree(d); return NULL; |
