kernel-fxtec-pro1x/samples/livepatch
Nicholas Mc Guire 086ed19ecf livepatch: check kzalloc return values
[ Upstream commit 5f30b2e823484ce6a79f2b59901b6351c15effa6 ]

kzalloc() return should always be checked - notably in example code
where this may be seen as reference. On failure of allocation in
livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous
allocation is freed (thanks to Petr Mladek <pmladek@suse.com> for
catching this) and NULL returned.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 439e7271dc ("livepatch: introduce shadow variable API")
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:47:12 +01:00
..
livepatch-callbacks-busymod.c
livepatch-callbacks-demo.c livepatch: Remove immediate feature 2018-01-11 10:58:03 +01:00
livepatch-callbacks-mod.c
livepatch-sample.c livepatch: Remove immediate feature 2018-01-11 10:58:03 +01:00
livepatch-shadow-fix1.c livepatch: check kzalloc return values 2019-02-12 19:47:12 +01:00
livepatch-shadow-fix2.c livepatch: Allow to call a custom callback when freeing shadow variables 2018-04-17 13:42:48 +02:00
livepatch-shadow-mod.c livepatch: check kzalloc return values 2019-02-12 19:47:12 +01:00
Makefile