Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching

Pull livepatch update from Jiri Kosina:
"Return value checking fixup in livepatching samples, from Nicholas Mc
Guire"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
livepatch: check kzalloc return values

+9
+5
samples/livepatch/livepatch-shadow-fix1.c
··· 89 89 * pointer to handle resource release. 90 90 */ 91 91 leak = kzalloc(sizeof(int), GFP_KERNEL); 92 + if (!leak) { 93 + kfree(d); 94 + return NULL; 95 + } 96 + 92 97 klp_shadow_alloc(d, SV_LEAK, sizeof(leak), GFP_KERNEL, 93 98 shadow_leak_ctor, leak); 94 99
+4
samples/livepatch/livepatch-shadow-mod.c
··· 118 118 119 119 /* Oops, forgot to save leak! */ 120 120 leak = kzalloc(sizeof(int), GFP_KERNEL); 121 + if (!leak) { 122 + kfree(d); 123 + return NULL; 124 + } 121 125 122 126 pr_info("%s: dummy @ %p, expires @ %lx\n", 123 127 __func__, d, d->jiffies_expire);