Use ENOTSUPP instead of ENOSYS because ENOSYS is reserved only for invalid syscall number.
Signed-off-by: Masami Hiramatsu <mhira...@kernel.org> --- include/linux/kprobes.h | 16 ++++++++-------- kernel/kprobes.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index bd2684700b74..39d558ec71c6 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -431,11 +431,11 @@ static inline struct kprobe *kprobe_running(void) } static inline int register_kprobe(struct kprobe *p) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_kprobes(struct kprobe **kps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_kprobe(struct kprobe *p) { @@ -445,11 +445,11 @@ static inline void unregister_kprobes(struct kprobe **kps, int num) } static inline int register_jprobe(struct jprobe *p) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_jprobes(struct jprobe **jps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_jprobe(struct jprobe *p) { @@ -462,11 +462,11 @@ static inline void jprobe_return(void) } static inline int register_kretprobe(struct kretprobe *rp) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_kretprobes(struct kretprobe **rps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_kretprobe(struct kretprobe *rp) { @@ -479,11 +479,11 @@ static inline void kprobe_flush_task(struct task_struct *tk) } static inline int disable_kprobe(struct kprobe *kp) { - return -ENOSYS; + return -ENOTSUPP; } static inline int enable_kprobe(struct kprobe *kp) { - return -ENOSYS; + return -ENOTSUPP; } #endif /* CONFIG_KPROBES */ static inline int disable_kretprobe(struct kretprobe *rp) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 2d28377a0e32..5e977d3b712a 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2021,13 +2021,13 @@ EXPORT_SYMBOL_GPL(unregister_kretprobes); #else /* CONFIG_KRETPROBES */ int register_kretprobe(struct kretprobe *rp) { - return -ENOSYS; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(register_kretprobe); int register_kretprobes(struct kretprobe **rps, int num) { - return -ENOSYS; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(register_kretprobes);