]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
livepatch: core: Return EOPNOTSUPP instead of ENOSYS
authorAlice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Mon, 4 Feb 2019 18:33:28 +0000 (03:33 +0900)
committerPetr Mladek <pmladek@suse.com>
Wed, 6 Feb 2019 09:43:57 +0000 (10:43 +0100)
As a result of an unsupported operation is better to use EOPNOTSUPP
as error code.
ENOSYS is only used for 'invalid syscall nr' and nothing else.

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/livepatch/core.c

index adca5cf07f7ed30a5e305d3a26d1fc5b24837cf7..5fc98a1cc3c34799e26e755847a9ba90ee429a4c 100644 (file)
@@ -1036,7 +1036,7 @@ int klp_enable_patch(struct klp_patch *patch)
 
        if (!klp_have_reliable_stack()) {
                pr_err("This architecture doesn't have support for the livepatch consistency model.\n");
-               return -ENOSYS;
+               return -EOPNOTSUPP;
        }