From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>
Cc: Elvira Khabirova <lineprinter@altlinux.org>,
Eugene Syromyatnikov <esyr@redhat.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ia64: fix syscall_get_error()
Date: Mon, 03 Dec 2018 03:17:25 +0000 [thread overview]
Message-ID: <20181203031725.GA11573@altlinux.org> (raw)
According to documentation in include/asm-generic/syscall.h,
syscall_get_error() should return -ERRORCODE if the system call failed.
This change fixes syscall_get_error() implementation on ia64 to match
its own syscall_set_return_value(), the documentation, and other
architectures where syscall_get_error() returns a non-positive value.
Fixes: cfb361f13c81 ("[IA64] utrace syscall.h support for ia64")
Cc: stable@vger.kernel.org # v2.6.27+
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
arch/ia64/include/asm/syscall.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h
index 1d0b875fec44..4ccf888c083d 100644
--- a/arch/ia64/include/asm/syscall.h
+++ b/arch/ia64/include/asm/syscall.h
@@ -35,7 +35,7 @@ static inline void syscall_rollback(struct task_struct *task,
static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs)
{
- return regs->r10 = -1 ? regs->r8:0;
+ return regs->r10 = -1 ? -regs->r8 : 0;
}
static inline long syscall_get_return_value(struct task_struct *task,
--
ldv
WARNING: multiple messages have this Message-ID (diff)
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>
Cc: Elvira Khabirova <lineprinter@altlinux.org>,
Eugene Syromyatnikov <esyr@redhat.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ia64: fix syscall_get_error()
Date: Mon, 3 Dec 2018 06:17:25 +0300 [thread overview]
Message-ID: <20181203031725.GA11573@altlinux.org> (raw)
According to documentation in include/asm-generic/syscall.h,
syscall_get_error() should return -ERRORCODE if the system call failed.
This change fixes syscall_get_error() implementation on ia64 to match
its own syscall_set_return_value(), the documentation, and other
architectures where syscall_get_error() returns a non-positive value.
Fixes: cfb361f13c81 ("[IA64] utrace syscall.h support for ia64")
Cc: stable@vger.kernel.org # v2.6.27+
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
arch/ia64/include/asm/syscall.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h
index 1d0b875fec44..4ccf888c083d 100644
--- a/arch/ia64/include/asm/syscall.h
+++ b/arch/ia64/include/asm/syscall.h
@@ -35,7 +35,7 @@ static inline void syscall_rollback(struct task_struct *task,
static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs)
{
- return regs->r10 == -1 ? regs->r8:0;
+ return regs->r10 == -1 ? -regs->r8 : 0;
}
static inline long syscall_get_return_value(struct task_struct *task,
--
ldv
next reply other threads:[~2018-12-03 3:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 3:17 Dmitry V. Levin [this message]
2018-12-03 3:17 ` [PATCH] ia64: fix syscall_get_error() Dmitry V. Levin
2020-01-11 16:37 ` [PING PATCH] " Dmitry V. Levin
2020-01-11 16:37 ` Dmitry V. Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181203031725.GA11573@altlinux.org \
--to=ldv@altlinux.org \
--cc=esyr@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=lineprinter@altlinux.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.