lkml.org 
[lkml]   [2019]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS
Date
From: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>

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>
---
Changes v1->v2:
- Use EOPNOTSUPP instead of ENOTSUPP (Petr)

kernel/livepatch/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index fe1993399823..075eb5c0813d 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -1004,7 +1004,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;
}


--
2.19.2
\
 
 \ /
  Last update: 2019-02-04 19:51    [W:0.102 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site