summaryrefslogtreecommitdiff
path: root/fs/signalfd.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-10-07 15:31:31 +0900
committerAndi Kleen <ak@linux.intel.com>2010-10-08 09:32:15 +0200
commitb8aeec34175fc8fe8b0d40efea4846dfc1ba663e (patch)
tree8111b66ee029cad8950c58bd7d0e5df38a69a321 /fs/signalfd.c
parent6b0cd00bc396daf5c2dcf17a8d82055335341f46 (diff)
downloadlwn-b8aeec34175fc8fe8b0d40efea4846dfc1ba663e.tar.gz
lwn-b8aeec34175fc8fe8b0d40efea4846dfc1ba663e.zip
HWPOISON/signalfd: add support for addr_lsb
Similar change as to signal delivery: copy out the si_addr_lsb field to user space in signalfd Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r--fs/signalfd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 1c5a6add779d..bdd4496ae67f 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -99,6 +99,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
#ifdef __ARCH_SI_TRAPNO
err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
#endif
+#ifdef BUS_MCEERR_AO
+ /*
+ * Other callers might not initialize the si_lsb field,
+ * so check explicitly for the right codes here.
+ */
+ if (kinfo->si_code == BUS_MCEERR_AR ||
+ kinfo->si_code == BUS_MCEERR_AO)
+ err |= __put_user((short) kinfo->si_addr_lsb,
+ &uinfo->ssi_addr_lsb);
+#endif
break;
case __SI_CHLD:
err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);