Re: [PATCH] livepatch: robustify klp_register_patch() API error checking

From: Jiri Kosina
Date: Thu Apr 07 2016 - 16:33:20 EST


On Thu, 7 Apr 2016, Jiri Kosina wrote:

> From: Jiri Kosina <jkosina@xxxxxxx>
>
> Commit 425595a7fc20 ("livepatch: reuse module loader code to write
> relocations") adds a possibility of dereferncing pointers supplied by the
> consumer of the livepatch API before sanity (NULL) checking them (patch
> and patch->mod).
>
> Spotted by smatch tool.
>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Acked-by: Jessica Yu <jeyu@xxxxxxxxxx>

Pushed out. Thanks,

--
Jiri Kosina
SUSE Labs