]> git.baikalelectronics.ru Git - kernel.git/commit
livepatch: Handle allocation failure in the sample of shadow variable API
authorPetr Mladek <pmladek@suse.com>
Thu, 16 Jan 2020 15:31:45 +0000 (16:31 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 17 Jan 2020 10:12:06 +0000 (11:12 +0100)
commit86d20669115a9020e3bea406bce5648648cc8ead
tree4b9fbbe6954225043b3b2f4261ae861b16119d55
parent6b99cb3f9b80912ce335ccb48d7374722fd55620
livepatch: Handle allocation failure in the sample of shadow variable API

klp_shadow_alloc() is not handled in the sample of shadow variable API.
It is not strictly necessary because livepatch_fix1_dummy_free() is
able to handle the potential failure. But it is an example and it should
use the API a clean way.

Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
samples/livepatch/livepatch-shadow-fix1.c