public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS
@ 2019-02-04 18:33 Alice Ferrazzi
  2019-02-05 12:26 ` Petr Mladek
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alice Ferrazzi @ 2019-02-04 18:33 UTC (permalink / raw)
  To: jpoimboe, jeyu, jikos, mbenes, pmladek, live-patching,
	linux-kernel
  Cc: Alice Ferrazzi

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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-02-08 15:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-04 18:33 [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS Alice Ferrazzi
2019-02-05 12:26 ` Petr Mladek
2019-02-05 13:05 ` Miroslav Benes
2019-02-05 15:59 ` Josh Poimboeuf
2019-02-06 10:28   ` Petr Mladek
2019-02-08  6:20     ` Kamalesh Babulal
2019-02-08  9:24       ` Miroslav Benes
2019-02-08 13:22         ` Kamalesh Babulal
2019-02-08 15:35           ` Miroslav Benes
2019-02-08  9:34       ` Petr Mladek
2019-02-08 14:13         ` Kamalesh Babulal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox