Commit 61bf12d
Jiri Kosina
livepatch: robustify klp_register_patch() API error checking
Commit 425595a ("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@oracle.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Jessica Yu <jeyu@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>1 parent 3b812ec commit 61bf12d
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
879 | 882 | | |
880 | 883 | | |
881 | 884 | | |
| |||
885 | 888 | | |
886 | 889 | | |
887 | 890 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| |||
0 commit comments